Write the code for select the 5 values from drop down list.
drop down list having the 10 values.
Answer Posted / ashish srivastava
Copy and paste the Below code
dim CountItem
countItem=Browser().Page().Weblist().GetROProperty("Itemcount")
For i = 1 to CountItem
Browser(). Page(). Weblist().Select i
if i >5 then
Browser(). Page(). Weblist().ExtentedSelect i
end If
Next
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
how did u use automating testing tools in ur job?
In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?
How to export quicktest professional (qtp) results to an .xls file?
What is the script for database check point, bitmapchek point, regular expression ?
what is the difference btn risks & Therads in the Test plan documentation?
Whats the realtime QTP testing process
What is synchronization? What are the ways you can synchronize?
what is vmodel?advantages and disadvantages of vmodel?
Brief the process of testing with UFT?
suppose in the middle of the project QTP will not work properly, then what do u do? and ur team?
How can you send user defined messages to test report?
i need qtp tutorial. pls send it to sridhar.k151@g mail.com
Explain the concept of object repository?
when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next
Are Shared ORs read-only?