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
how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?
What is regular expression?
Explain the types of object repository?
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
What is standalone database?
Can anybody post some real time scenario in qtp? please its very urgent.
how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0
What are the properties you would use for identifying a browser and page when using descriptive programming?
Shall we add Local Repository to shared object repository,if yes,how we add
How to replay a script in qtp?
How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.
How software tester can use constants and variables in scripts?
A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.
What is the script for database check point, bitmapchek point, regular expression ?
After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans