Forum Discussion
Hi,
I want to make sure the given object is not exist in the screen.
function Obj_VerifyExists()
{
var objObjectName = NameMapping["Sys"]["IEXPLORE"]["pageMiserBa"]["frameThisapp"]["frameMainframe"]["formTheform"]["Panel"]("buttonsDiv")["Button"]("AddBtn");
if (objObjectName["Exists"] == true)
Log["Message"]("Object is exist in the screen");
else
Log["Message"]("Object not exist in the screen")
}
If the object is exist the if part is working fine.
If the given object is not exist it is not going to else part. It’s giving error and stopping the script while assigning the object name to the variable (Getting error in very first line). The given object is exist in object repository.
Please suggest how to make sure the given object is not exist in the screen?
Thanks,
Lakshmi Priya