Forum Discussion

Adil's avatar
Adil
Occasional Contributor
11 years ago

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.

 

 

Url: = http://sarahraven.release-preview.blubolt.com/flowers/plants/roses/highly_scented_rose_collection.htm

 

 

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

 

 

 

 

9 Replies

  • Hi,

    The Url provided is asking for username and password.

     

    Not being able to see an example, I have not come across Native Web Objects that include "Innertext" as an property.  Usually it's just height, id, name and width.  Double check the NativeWebObject properties of the button to see if they are correct.

     

    The innerText property I don't think can be accessed with the NativeWebObject object.  Try using Find.

    Example:
    sys.browser("iexplore").page("*").find("innerText", "Buy", 50)