![]() |
Checking 'Error' on web page - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Checking 'Error' on web page (/Thread-Checking-Error-on-web-page) |
Checking 'Error' on web page - laura - 08-14-2009 I am working on a web app. I want to be able to check if on page load up at any time there is an error on the page, if some webparts dont load up successfully the sites displayes "Error"!! in their location. is there a way i can check for the string "error" anytime i am on a page? Thanks RE: Checking 'Error' on web page - Saket - 08-15-2009 a screen shot of the page with error will help. also if you can provide a snap of the spy on the object which contains the error string RE: Checking 'Error' on web page - basanth27 - 08-17-2009 As you mentioned, if you are sure that a "Error" string is displayed whenever webparts dont load then you can simply add that image or webelement or whatever the string is and do this, Code: If object().Exist(2) Then Or on a sideline you can check for the browser status message or the page message, Sometimes when the page does not get completely loaded then the browser sends out a status message that "Error on Page". Let me know if it helps. RE: Checking 'Error' on web page - supputuri - 08-17-2009 Hi laura, You can check the page status by validating the text displayed in the "WinStatusBar" displayed. The general status are "Done,Done, but with errors on page,Error on Page,Error" you can use a conditional loop to check this. Let me know if you need any more info. |