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
Do you know how to connect database? Can you tell me the procedures?
Hi All, How to get repeated word in string . Thanks Balaji
How do you do batch testing in wr & is it possible to do in qtp, if so explain?
what is Property......End Property loop? how to write sript for it in QTP
Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?
How to handle the exceptions using the recovery scenario manager in qtp?
How can you write the scripts that operate on different objects depending on run-time information?
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
Hi we are using QTP9.0 for Seibel Application and this seibel application will give you a popup messagebox which is of web , so qtp takes 3 mins to recognize the messagebox and to click on it , we have more number of messageboxes like this . please suggest me some solution
How to open a new test using quicktest professional (qtp)?
What is the new version of qtp which is recently released in the market?
What does it mean when a check point is in red color? What do you do?
How to create runtime property for an object?
How to define array in qtp?
What is exact meaning of Database Checkpoint in QTP 9.2 and what are the different types of the database check points?