![]() |
QTP not recognizing the webelement - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: QTP not recognizing the webelement (/Thread-QTP-not-recognizing-the-webelement) |
QTP not recognizing the webelement - vidya2k2 - 04-03-2015 Hi, I am trying to validate if a webelement property exists on the page or not. But QTP always returns true ![]() ![]() ************************************************************ Code: BlnResult = Browser("CDMS :: Master Agreement").Page("CDMS :: Master Agreement").WebElement("File Upload successfully").Exist(0) Then QTP always true even in case if web element doesn't exist on the page. RE: QTP not recognizing the webelement - supputuri - 04-03-2015 check the x,y values of the webelement if the values are <0 then you can consider that the object does not exist on the page. Below is the pseudo code.... Code: BlnResult = Browser("CDMS :: Master Agreement").Page("CDMS :: Master Agreement").WebElement("File Upload successfully").Exist(0) Then RE: QTP not recognizing the webelement - vidya2k2 - 04-04-2015 Hi, values are positive only ... Moreover when i try to do object spy for the webelement (when the object doesnt exist on the page), QTP recognizes the page but not highlighting anything. Does it mean object exists on the page (like hidden)? Expectation is, QTP should throw a pop up saying "object doesn't exists on the application". Am i right ? RE: QTP not recognizing the webelement - babu123 - 04-06-2015 try with this Code: WebElement("File Upload successfully").getroproperty("visible") |