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
What are the different kinds of test steps?
can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?
Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?
hi Friends ,willany body tell me what is the Scope for the automation Testing inht Future is their Or not And what is the Top Most Level in the testing section according the Pay scale
how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance
What phases are involved in testing an application in qtp?
you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva
how to prepared for first for the first interview?
Give the syntax to load function at run time.
Explain xml checkpoints.
What is the architecture of your project? Can any one answer for this question plz........
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
Explain the benefits of quick test pro(qtp)?
what testplan contents and what test strategy contents,what is the diff b/w them
What is the use of running the scripts in Hidden-mode in UFT?