Results 1 to 2 of 2

Thread: QTP- wrong object recognised...

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Answers
    1

    QTP- wrong object recognised...

    Hi All,

    I am stuck on a problem and will be grateful if anyone can suggest possible solutions:

    I am recording a script which is essentially a process that involves the following:

    - Loging on to a website
    - Searching for an entry within a long list of entries by typing its name and clicking search
    -When the entry is found it is displayed on the screen
    -This entry is representing one of many buildings a company holds. The basic properties of the entry are in a row. One of these entries is the 'Status' of the building.

    i.e.
    Property Name | Status | ....

    X (this is a link which takes you to the datasheet of the property) | Occupied|......

    -clicking on the link (X) which takes you to the datasheet of the property and changing the status of the building by choosing a different value from the drop-down menu ( e.g from Occupied to Reserved).

    The test aims to check that when this change is saved, it is reflected in the table.

    The problem is that When I try to rerun my recorded scripts, the test fails towards the end of the script because as we save the new selection from the drop down menu, it immediately changes that selection to 'blank'.

    So basically it does change the status, but doesn't change it to what has been recorded...

    Any suggestions?

    Thanks.


  2. #2
    Contributing Member
    Join Date
    Feb 2006
    Answers
    33

    Re: QTP- wrong object recognised...

    The quick reason I can think of in this case is, when dealing with drop-down boxes or in tech terms, combo box/ list box(whatever it is in ur case) QTP goes by index number. The solution for this may be,
    e.g. ur statement is recorded as under
    Browser("a1).Page("a1").ListBox("a1").Select "Occupied"
    Instaed of this give following:
    (suppose 2 is the index no. for occupied status)
    index_no = 2
    Browser("a1).Page("a1").ListBox("a1").Select index_no

    Don't forget to regularise the expression for the value of the list box to any number.
    Tell me if this worked. Otherwise maybe we can try for something else.


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