Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP not clicking on Yes button in the IE pop up dialog
#1
Not Solved
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")
Call fnCleanBrowserPopups(oBrw)

Public Function fnCleanBrowserPopups(oBrw)

   'Get the popup dialog
   Set oPopDlg = oBrw.Dialog("ispopupwindow:=True")

   fnCleanBrowserPopups = False
   If oPopDlg.Exist(0) Then
      'There is a popup dialog
      'Get its title
      sPopTitle = oPopDlg.GetROProperty("title")

      Select Case LCase(sPopTitle)
          Case  "Internet Explorer"
            oPopDlg.WinButton("text:=&Yes").Click
            fnCleanBrowserPopups = True
            Reporter.ReportEvent micPass, sPopTitle, "Closed IE dialog popup"
         Case Else
            Reporter.ReportEvent micFail, "Unknown dialog box - ", sPopTitle
      End Select
   End If

End Function
But still no luck. The above function gets the handle to the title of the pop up - sPopTitle = oPopDlg.GetROProperty("title"), but never clicks the Yes button

Please suggest me something here

Regards
Srinivas
Reply


Messages In This Thread
QTP not clicking on Yes button in the IE pop up dialog - by adityasrinivasb - 09-12-2013, 04:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Winbutton slow in clicking kpat 0 1,848 05-23-2016, 12:09 PM
Last Post: kpat
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,563 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
Rolleyes QTP pop up window handling piyush8793 3 16,943 10-15-2015, 11:03 PM
Last Post: Venkateswarluponna
Shy 5 Save button QTP Qtpnew 1 2,433 09-03-2015, 09:52 AM
Last Post: supputuri
  Clicking on sublink venkatesh9032 1 2,805 06-01-2015, 08:26 PM
Last Post: babu123

Forum Jump:


Users browsing this thread: 1 Guest(s)