Sometimes while using QTP script to add records , Windows might generate a Pop Up message with the following message
“This Website is using Scripted Window to ask you for information.If you trust this website, Click here to allow scripted Windows…” So here you need to right click (Even left click will work) and have to click on “Temporary allow scripted Windows message”. |
The script given below can help you avoid the task Browser(“”).Page(“”).Frame(“”).WebButton(“Add Entry”).Click ‘ Clicking on the Add Entry Button that Scripted Window Set WshShell = CreateObject(“WScript.Shell”) If Browser(“name:=Browser Name”).WinButton(“micclass:=WinButton”,
“text:=This website is using a scripted window to ask you for information. If you trust this website, click here to allow scripted windows…”). Exist(5) Then ‘Here we used descriptive programming to verify that the Pop Up
message appears or Not Browser(“name:=Browser Name”).WinButton(“micclass:=WinButton”, “text:=This website is using a scripted window to ask you for information. If you trust this website, click here to allow scripted windows…”). Click ‘ If Message exists then Click on The respective message If Window(“micclass:=Window”,”nativeclass:=#32768″).Exist(2) Then ‘ Now the Entry gets saved
End If End If
|