What will be the test script in QTP to test a ComboBox
where a user has to select more than two items????

Answer Posted / maheshbabu.t

Hi This Mahesh


I am sending the Descriptive Progarme see below

Function selectWebItem(webListName,ItemName,webItemIndexVal)
ClearDialogs()
strHandle = Window
("RegExpWndClass:=IEFrame","index:=0" ).GetROProperty
("hWnd")
Set gobjBrowser = Browser("hWnd:=" & strHandle)

Set gobjPage = gobjBrowser.Page("index:=1")
gobjPage.Sync
Set objDescription = Description.Create()
objDescription("Class Name").Value = "WebList"
objDescription("html tag").Value = "SELECT"
objDescription("name").Value = webListName


If gobjPage.WebList(objDescription).exist(0) Then
gobjPage.WebList(objDescription).select
ItemName
else
objDescription
("index").value=webItemIndexVal
If gobjPage.WebList(objDescription).exist
(0) Then
gobjPage.WebList
(objDescription).select ItemName
else
testPassCntr=testPassCntr+1

End if
End If
End Function

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create runtime property for an object?

1448


Have you faced any problems with object repository?

592


How many types of recording facility are available in quicktest professional?

564


Explain different types of checkpoints?

562


What is the keyword view and expert view in qtp?

531






When you open QTP, how many sheets you can see?

661


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

582


Dear sir, i want to perform a QTP automated testing for mechancial engineering software like msc adams, msc nastran this softwares will help for mechanical engineering design analysis>> i know oad runner win runner, test director, QTp>> but i dont know how to use for automation

1583


What is the pros and cons between QTP and Rational Robot

3284


Is QTP supports Unix. If yes, then how the test automation is done?

1728


How to integrate the qualitycenter with qtp

1773


Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

1584


Hi Samrat, Thank u very much, what u said it is right.

1347


who QTP recognizes the object stored in object repository?

1663


I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=", Second button "html id:=btnSave "outerhtml:=", Third button "html id:=", outerhtml:=",

1355