Write the code for select the 5 values from drop down list.
drop down list having the 10 values.
Answers were Sorted based on User's Feedback
we can select more than one value from drop own list by
using "extendedselect" option
Browser(" ").Page("").WebList("").Select " first item"
Browser(" ").Page("").WebList("").extendeSelect "#1"
Browser(" ").Page("").WebList("").extendedSelect "#2"
Browser(" ").Page("").WebList("").extendedSelect "#3"
Browser(" ").Page("").WebList("").extendedSelect "#4"
or
if the items are consecutive, then
for i=0 to 4
Browser(" ").Page("").WebList("").extendedSelect ("#"&i)
if i am worng pls correct me
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / 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 |
Answer / deven
Set WShShell = CreateObject("WScript.shell")
WShShell.SendKeys "{Down}", True
WShShell.SendKeys "{Down}", True
WShShell.SendKeys "{Down}", True
WShShell.SendKeys "{Down}", True
WShShell.SendKeys "{Down}", True
WShShell.SendKeys "{Enter}"
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / deven
Dim cMethodcount,cme
cMethodcount = Browser("IAS").Page("IAS").Frame("WorkFrame").WebList("CalcMethod").GetROProperty("items Count")
For cme = 1 to cMethodcount -1
Browser("IAS").Page("IAS").Frame("WorkFrame").WebList("CalcMethod").Select(cme)
If Instr(Browser("IAS").Page("IAS").Frame("WorkFrame").WebList("CalcMethod").GetROProperty("selection"),datatable.Value("CalculationMethod","dtAManagement")) Then
Exit for
End If
Next
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / balaji
For eg:If the weblist contains some x no. of values and if
we want to select only 10 out of it then
i=browser(..).Page(..).weblist(...).Getitemscount()
For j=0 to i
if j<5 then
browser(..).Page(..).weblist(...).select j
end if
next
This code will retrieve only the first 5 values
| Is This Answer Correct ? | 2 Yes | 5 No |
Answer / ram
Hi, I think if the object is dropdown(Combobox) we cannot select more than one value at a time.
please let me know if I am wrong.
Thanks in advance.
Ram
| Is This Answer Correct ? | 1 Yes | 4 No |
what is the difference between wait and wait function
HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...
What is the difference between browser sync and page sync in QTP?
In QTP how to interact tool and application build?
I m in new and want to learn QTP. Is any website which provide free QTP video training.....also can downlaod....
Why is Client side image is preferred over server side image?
what is regular expression how will you implement it?
How can we write script for a .net application in QTP? Can we use VB Script for .net application.
After geting the modules where we generate the script ie in qtp or notpad ?
Can you import and export data from XLS and how?
what is use of optionexplicit in variable declaration
can QTP works on LINUX platfom