Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
objects sometimes recognized and sometimes not
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
I am running QTP which opens a browser that has a place to enter login and password (similar to the flight demo). I added the boxes to the repository and put them into my QTP script (enter text in theusername box, enter text in the password box, and click login).

Sometimes when I run it it works fine.
Other times when I run it it says it can't find the objects (in runtime).
This happens with other objects to. A popup window somes up and
I can click buttons on it one time, and the next time the objects aren't
recognized.

In the case with the login, I don't know what is going on. Object spy seems to identify the objects, and the web site has not changed.

For the popup window one thing I noticed is sometimes an object is
called browser("xALIWeb").page("report") and then other times it might be called browser("xALIWeb").page("report_2") or even
browser("xALIWeb_2").page("report")

Why would boject names change like this? And what is happening with the login? It is only one page.
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
Did you try with descriptive programming?
if not please try with that....
or else use regular expression for your objects and try.
Reply
#3
Solved: 11 Years, 4 Months, 4 Weeks ago
HI,

Try to add the the objects in shared OR and call that OR in your test script.
Problem which u are facing of getting page name like report_2 is mainly when u used local OR.

Try the above and let me know if its work for u or not.

Regards,
Sankalp
Reply
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
I dont think, its the issue of using Local OR, the same can happen even if you use Shared OR. It could be like the page url is getting changed and could be resolved by using regular expression in the OR, as pointed out by Sathiya.

Reply
#5
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi,

Kindly refer to the below provided url, this might help u understanding and resolving the issue.

https://www.learnqtp.com/forums/Thread-P...p-changing

Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Telnet command not recognized Sanjana1987 1 2,124 09-20-2017, 03:16 PM
Last Post: Ankur
  Objects are being recognized as "Windows for Menu item list (Browser-firefox, UFT 12) akhandesh 0 2,557 05-27-2015, 06:29 PM
Last Post: akhandesh
Smile Importing Excel sheet - Reference Values are not recognized michiusa69 3 7,956 01-23-2015, 02:36 AM
Last Post: lkng2001
  IE Tester feature not recognized by UFT12.01 saraiado 2 2,818 12-23-2014, 09:41 AM
Last Post: vinod123
  Browser object recognized as "Window" in google chrome version 24 pradeep singh 6 11,062 08-08-2013, 03:46 PM
Last Post: Kannan R

Forum Jump:


Users browsing this thread: 1 Guest(s)