Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Handler Page Redirects
#1
Not Solved
We have an in-house web app that I am testing.

There is a form with a field and button.  
I have a long list of accounts and I know what is expected to be displayed on the screen for each account.
Each iteration I simply enter the account number, click the button and verify the screen for correct content.

We run this overnight.  At least once during the night, after clicking the button, it redirects to a main company page and my code does not know what to do.  It halts.

So I added code to look for an object on that redirect page and if it is there, close the browser and open it back up (what I would do manually).

Even though this redirect page is NOT displayed and NOT loaded, every time it comes to the IF statement, it is TRUE.  I have tried even "visible" = True and that is always true even when the redirect page is not visible.  The developers must have it pre-loaded somewhere and even though its state is visible (because visible is always True), it must be hidden.

There has to be a way to detect this page, if it exists, close all browsers (I have the code for this), relaunch the browser and let it resume.  Maybe I can check the URL in each iteration and if it equals the URL of the redirect page I can close and re-open the browser?  I do not know how to do this.

Or maybe there is an even better and easier way?

Thank you
Reply
#2
Not Solved
I didn't understand from this part onward...
Quote:Even though this redirect page is NOT displayed and NOT loaded, every time it comes to the IF statement, it is TRUE.  I have tried even "visible" = True and that is always true even when the redirect page is not visible.  The developers must have it pre-loaded somewhere and even though its state is visible (because visible is always True), it must be hidden.


... but still it sounds like a fit case of using Recovery Scenarios. By any chance did you try them?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can UFT Handle Detecting Redirects? zunebuggy 0 893 05-28-2020, 06:50 PM
Last Post: zunebuggy
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 5,072 05-03-2013, 11:53 PM
Last Post: agarwl.anurag
  Cannot find the "WebEdit" object's parent "Page" (class Page) hpham 1 7,788 06-26-2008, 12:26 AM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)