The objects in the scripts are being defined with descripting programing. Now there is a new webpage dialogue that needs to be handled.
The object hierarchy when we record on this window
is Browser("Browser").Window("Window").page("page"). Winbutton("No").Click
However since in this script all of the objects are defined through descriptive programing
When I tried the below its not working
If oBrowser1.window ("regexpwndtitle:=xxx").Exist Then
oBrowser1 .window ("regexpwndtitle:=xxx").page("title:=page").WebBut ton("name:=No").Click
in the above code I am getting the message "Hello" on the screen so that means its recognizing the window however itís not clicking the button on the window.
further I have also added the window to the repository just to elimate the errors but no luck.
btw, the oBrowser1 is define as public variable
as public oBrowser1
set oBrowser1 = Browser("creationtime:=1")
Thank you for all the replies. as mentioned above by Nouseforaname it seems to be a sync issue.
"Try updating your exist statement to apply all the way down to the 'no' button level. Could be a sync issue.
If that doesn't resolve it, try changing replaytype to mouse/keyboard simulation. "
I added the sync statement before clicking on it and updated the exist statement as below
oBrowser1 .window ("regexpwndtitle:=xxx").page("title:=page").Web But ton("name:=No").exist
it now recognizes the button.
Perhaps try opening a new action to get an empty OR.
Record clicking on the object.
Use the properties suggested by QTP.
Go one level at a time(browser,page,object) and use highlight to see if you are reaching each level.