QTP not clicking on Yes button in the IE pop up dialog - 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: QTP not clicking on Yes button in the IE pop up dialog (/Thread-QTP-not-clicking-on-Yes-button-in-the-IE-pop-up-dialog) |
QTP not clicking on Yes button in the IE pop up dialog - adityasrinivasb - 09-12-2013 Hi I am automating a web application using QTP 11. After the login operation, I get the IE pop up dialog titled -"Internet Explorer" and text inside it - "The page is accessing information that is not under its control. This poses a security risk. Do you want to continue" with a Yes and No button. I automated it by adding the objects in the repository and writing script Code: Browser("Mybrowser").Dialog("Internet Explorer").WinButton("Yes").Click But the above script some times fails to click the Yes button I tried descriptive programming like this Code: Browser("title:="My Browser").Dialog("text:=Internet Explorer").Winbutton("text:=&Yes").Click I could not get the Yes button clicked with the above statement At last I tried to handle it by using a function Code: Set oBrw = Browser("title:="My Browser") Please suggest me something here Regards Srinivas RE: QTP not clicking on Yes button in the IE pop up dialog - SweetyChowdhury - 09-13-2013 Try this code below: Code: IF Browser("Mybrowser").Dialog("Internet Explorer").Exist(0) Then Insert the reporter statements accordingly. The code first checks the dialog box exists and then activates the 'Yes' button. RE: QTP not clicking on Yes button in the IE pop up dialog - prashantrawat101@gmail.com - 09-29-2013 In Descriptive programming,Use the micclass property to select the yes button by specifying its ordinal identifier(index). |