06-17-2011, 06:52 PM
This seems to work. But if my browser is "Page not Found" ie the webserver is down, etc, the path in my code still goes to the "If" statement (True), and not to the "Else" (False).
Can I get a look at my code to see why, the Else (False) is not sellected, even though the web server is clearly down?
My code:-)
Should I change:
If Valid Then 'Gets stuck here when "The page cannot be displayed"
Can I get a look at my code to see why, the Else (False) is not sellected, even though the web server is clearly down?
My code:-)
Code:
Browser("Wisdom").Page("WisdomLogin").WebElement("Welcome to Wisdom").WaitProperty "visible", True, 5000
If Browser("Wisdom").Page("WisdomLogin").WebElement("Welcome to Wisdom").GetROProperty("visible") Then 'Gets stuck here when "The page cannot be displayed"
''Browser Opened successfully in URL
Reporter.ReportEvent micPass, "Browser in URL: " & DataTable.GlobalSheet.GetCurrentRow, "URL: " & " - opened SUCCESFULLY."
Else
'Browser Failed to open in URL
Reporter.ReportEvent micFail,"Browser in URL: " & DataTable.GlobalSheet.GetCurrentRow, "URL: " & " - opened UNSUCCESFULLY."
Browser("Wisdom").Close
ExitTest
End If
Code:
Valid = Browser("Wisdom").Page("WisdomLogin").WebElement("Welcome to Wisdom").WaitProperty "visible", True, 5000
If Valid Then 'Gets stuck here when "The page cannot be displayed"