08-24-2009, 04:14 PM
OK, here is the code:
So the test fails within the latest If-statement. If this conditional statement was not present, the test would fail with an "Object not visible exception" in the following actions.
Code:
Dim BrowserTab_1, BrowserTab_2
'The following assignment is just a preparation for future use
Set BrowserTab_1 = Browser("Web1")
Set BrowserTab_2 = Browser("Web2")
If Not BrowserTab_2.Page("Import").Exist Then
Reporter.ReportEvent micWarning, "Detecting Import page", "Page not found"
If Not BrowserTab_1.Page("Home Page").Exist Then
Reporter.ReportEvent micFail, "Open Import Page", "Home page not found"
ExitTest
Else
BrowserTab_1.Page("Columbus Home Page").Link("Import").Click
Reporter.ReportEvent micDone, "Open Import Page", "Executed"
Wait(120)
End If
Else
Reporter.ReportEvent micDone, "Detecting Import page", "Page found: "+ BrowserTab_2.Page("Import").GetROProperty("url")
End If
If Not BrowserTab_2.Page("Import").Exist Then
Reporter.ReportEvent micFail, "Open Import Page", "Unable to open Import page"
ExitTest
End If
'Actions for Import-page here
So the test fails within the latest If-statement. If this conditional statement was not present, the test would fail with an "Object not visible exception" in the following actions.