05-30-2012, 04:23 PM
My question to you here is , does QTP throw a runtime error, with description saying something like that "object not found" ?
and my suggestion would be to take a safer approach, and first check if the web element exists... just a example code idea...
your problem might get solved this way around.
and my suggestion would be to take a safer approach, and first check if the web element exists... just a example code idea...
Code:
if Browser().Page().WebElement().Exists(5) Then
if Browser().page().WebElement().GetROProperty("visible") Then
//Your code for when the element is visible
Else
//Your code for when element exists in the page but is not visible
Else
//Your Code for when the element totally does not exist on the page
your problem might get solved this way around.