Adil
11 years agoOccasional Contributor
why doesn't NativeWebObject.Find method work for inprivate IE
I am trying to use NativeWebObject.Find method to find a button on a webapage and click it. (Please see below example)
This works correct when I'm using a normal IE browser but when I use InPrivate IE Browser its not working. Is there a patch to get around this please.
Sub ClkButton
Set Page = Sys.Browser("iexplore").Page("*")
' Using the Find method
Set myBtn = page.NativeWebObject.Find("Innertext", "Buy", "BUTTON")
' Checks if the button exists
If myBtn.Exists Then
myBtn.Click
Else
log.Error("Button does not Exist")
End If
End Sub