| || |
Page title changes for each next line. Method to overcome this problem
I have recorded a script in QTP for one of my Web application.I have a problem with changing the object name in the browser. I have a Browser for which the page title changes for each step.In QTP, any object is identified by a page title (for a page in a browser).Now, the problem with this is that, the page title can be different when I run the same script second time. For example, I have a Browser page by name--> "Details for Performance-1", where "Details for" is a constant for that page, but "Performance-1" is a variable (which is got from the global sheet) changes for the second run. Now, if I go to parameterise this Page title, QTP identifies it as a 'statement' instead of as an object, and throws the error as "object not found in repository' while running next time.
I tried with giving the Text checkpoints, my script works fine with these text checkpoints, but the problem is, there are almost more than 20 lines for which i need to apply these check points, also this is a tedious job,if the lines further increase in future (the same problem, if i use regular expression for this variable).
So, can you please help me in this regard? Your ideas on this will be much more helpful for me.