-
Junior Member
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.
-
Contributing Member
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
-
Forum Rules