Micro Focus QTP (UFT) Forums
GetROProperty URL redirect - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: GetROProperty URL redirect (/Thread-GetROProperty-URL-redirect)



GetROProperty URL redirect - pufftmd - 02-24-2011

Hi,

We have a test which sometimes fails and redirects to sitename/error I would like to build a check into the test to confirm that if the url is equal to the above then fail.

One of the first bits of coding I have is
Code:
Do
  Wait 1
Loop While Browser("Browser").Page("Page").Frame("openDocChildFrame").WebEdit("CrystalReportViewer_p0Discrete").Exist = False

What I would like to do is while we are waiting for the object to appear if the site fails I will get redirected to http://sitename/Error if this is the case I want to fail the test.

I am thinking of adding an IF URL is = to http://sitename/Error Then Services.EndTransaction...

is this the best way of implementing this type of check?