Micro Focus QTP (UFT) Forums
How to check current active screen? - 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: How to check current active screen? (/Thread-How-to-check-current-active-screen)



How to check current active screen? - GanesanAnand - 11-25-2011

I am in Page1, where I will be entering customer name, if i click on Next button, If Customer name already exist, it will throw error message. if not it will take you to next screen.

Please help me how to write code in QTP.



RE: How to check current active screen? - ravi.gajul - 11-25-2011

Code:
If Browser("Home").Page("Home").WebElement("<ErrorMessage>").Exist then
    ...enter a new customer name to remove the error message
     Browser("Home").Page("Home").Webbutton("Next>>).click
End If
insert a check point on some element which confirms that the new page is loaded fully upon clicking next