Sometime the Pop-ups create problem while running the script (Browser pop-ups). To overcome this problem we can manipulate Registry key.
QTP can use this function.
'Create the shell object
Set WshShell = CreateObject("WScript.Shell")
'Path to edit in registry
popupKeyPath = "HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMgr"
'Disable the IE pop-up blocker
WshShell.RegWrite popupKeyPath, "no", "REG_SZ”
‘Enable the IE pop-up blocker
WshShell.RegWrite popupKeyPath, "yes", "REG_SZ”
No comments:
Post a Comment