Results 1 to 7 of 7

Thread: Selecting Row using QTP

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Answers
    2

    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


  2. #2
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    Re: Selecting Row using QTP

    The script will be something like...

    Browser("Flight Applicaton").Page("Flight Applicaton").WebList("From").Select "Delhi"


  3. #3
    Junior Member
    Join Date
    Jan 2007
    Answers
    2

    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.


  4. #4
    Junior Member
    Join Date
    Feb 2007
    Answers
    12

    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.


  5. #5
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    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.


  6. #6
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    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.


  7. #7
    Junior Member
    Join Date
    Feb 2007
    Answers
    17

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact