08-06-2008, 10:37 AM
Instead of using QTP to deal with the pop-ups, you can use vbscript to disable the popups directly by accessing the Hkeys in the registry. Below is the code for:
'If the address(URL) in a certificate is not valid
'Issue a warning if you are switching between secure and non-secure sites
'Issue a warning when information is sent to another website
Put the above code in a function or a library and associate the library with your tests.
The above solution proved a lot faster and reliable than Recovery Scenarios and .Exist methodologies.
Tell us all if the above worked for you. If it has, other users will be sure where to look for when they encounter this problem.
'If the address(URL) in a certificate is not valid
Code:
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\"&strComputer& "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\InternetSettings"
ValueName = "WarnonBadCertRecving"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strkeypath, ValueName, dwValue
'Issue a warning if you are switching between secure and non-secure sites
Code:
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\"&strComputer& "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\InternetSettings"
ValueName = "WarnonZoneCrossing"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strkeypath, ValueName, dwValue
'Issue a warning when information is sent to another website
Code:
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\"&strComputer& "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\InternetSettings"
ValueName = "WarnonPostRedirect"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strkeypath, ValueName, dwValue
Put the above code in a function or a library and associate the library with your tests.
The above solution proved a lot faster and reliable than Recovery Scenarios and .Exist methodologies.
Tell us all if the above worked for you. If it has, other users will be sure where to look for when they encounter this problem.