-
Junior Member
Selecting Row using QTP
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
sureshkumar.gopal@gmail.com
-
Contributing Member
Re: Selecting Row using QTP
The script will be something like...
Browser("Flight Applicaton").Page("Flight Applicaton").WebList("From").Select "Delhi"
-
Junior Member
Re: Selecting Row using QTP
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.
-
Junior Member
Re: Selecting Row using QTP
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.
-
Contributing Member
Re: Selecting Row using QTP
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.
-
Expert Member
Re: Selecting Row using QTP
Hi
You can just give .Select and then the parameter eg... .Select "Paris" instead of "#2". The earlier one is the easier process.
-
Junior Member
Re: Selecting Row using QTP
inos = Window("Flight Reservation").WinCombobox("Flyfrom:").getitemscount
msgbox inos
for i = 0 to inos-1
window("Flight Reservation").Wincombobox("Flyfrom:").getitem(i)
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules