Micro Focus QTP (UFT) Forums
How to handle pop up blocker. - 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 handle pop up blocker. (/Thread-How-to-handle-pop-up-blocker)



How to handle pop up blocker. - chetan-24 - 11-28-2008

hello
I have found such an interesting Problem at my site,
While i am running/Recording some script the script is recorded fine but while i am running that script at that time the pop up blocker has been generated.
Could anybody spacify that how can i handle that pop up blocker?
I am using IE 7 browser and my pop up blocker is already disable.

Thanks with Regards,
Chetan


RE: How to handle pop up blocker. - yaron.assa - 11-29-2008

Sorry, the only consistent a robust way would be to turn off the pop-up blocker:
Tools->Popup Blocker->Turn off


RE: How to handle pop up blocker. - chetan-24 - 11-29-2008

Hello
I don't think it's only way to do so,

Please spacify you have some other option for that
either scripting or recovery scenario.

Thanks
Chetan


RE: How to handle pop up blocker. - devanggoel - 02-18-2010

ya dear there is a easy way to handle this type of problem by creating the recovery scenario.
and u can write the the script also with the condition like if this popup on then do that.


RE: How to handle pop up blocker. - nilanjans - 06-08-2012

Hi,

I think when the Pop Up blocker appears on the screen then we can Right click on that message and go for the Temporary allow option .

So if that is the scenario, then we are able to handle it via scripting.


'Handling the Temporary allow Scripts and windows Prompt message and click OK"
Code:
Set obj1=CreateObject("Mercury.DeviceReplay")

If Browser("Intelex v5").WinButton("This website is using").Exist(4) Then
x = Browser("Intelex v5").WinButton("This website is using").GetROProperty("abs_x")
wait(2)
y= Browser("Intelex v5").WinButton("This website is using").GetROProperty("abs_y")

'Click RIGHT_MOUSE_BUTTON

obj1.MouseClick x,y,2
wait(2)
Set wsh=CreateObject("WScript.Shell")

wsh.SendKeys "{DOWN}"

wsh.SendKeys "{ENTER}"
wait(2)
Browser("Intelex v5").Page("Intelex v5").Frame("content_2").WebButton("Save/Exit").Click

end if


Hope this will help.

Regards,
Nilanjan.