In WinRunner, We can select row from the list using
list_select_item(("flight","#0");
#0 represents first row
#1 represents second row and so on.
How can this be applied to QTP?
Thanks
Suresh
[email]sureshkumar.gopal@gmail.com[/email]
Printable View
In WinRunner, We can select row from the list using
list_select_item(("flight","#0");
#0 represents first row
#1 represents second row and so on.
How can this be applied to QTP?
Thanks
Suresh
[email]sureshkumar.gopal@gmail.com[/email]
The script will be something like...
Browser("Flight Applicaton").Page("Flight Applicaton").WebList("From").Select "Delhi"
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").Select "Unified Airlines$363$281$11:24"
You are right in one way. Instead of "Unified Airlines$363$281$11:24"
is there any way I can select particular row without typing the description.
If it is weblist then you can use "items count" property to get no.of items from the list.Then u need to use for loop to get the required item from the list.
Also, we can select a particular row without typing the description, if we know the index, like:
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").Select "#3"
where #3 is the item in 4th row.
Hi
You can just give [B].Select[/B] and then the parameter eg... .Select "Paris" instead of "#2". The earlier one is the easier process.
inos = Window("Flight Reservation").WinCombobox("Flyfrom:").getitemscount
msgbox inos
for i = 0 to inos-1
window("Flight Reservation").Wincombobox("Flyfrom:").getitem(i)
Next