Forum Discussion
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)
- Adil10 years agoOccasional Contributor
Sorry use this Url instead
http://www.sarahraven.com/flowers/plants/roses/rose_roseraie_de_lhay.htm
as you can see when you run it that it works fine on a normal IE browser but when trying to use a inPrivate IE browser it can't recognise it
- Adrian_Tankard10 years agoContributor
I suspect that IE prevents Test Complete from working correctly in Prviate Browsing.
Other plugins also don't work.
- Adil10 years agoOccasional Contributor
Hi
I've amend it to the following it worked twice but not it isn't working please help.
i need a way to search for a button on a webpage and then be able to click it
sub test3
Set Page = Sys.Browser("iexplore").Page("*")
' Using the Find method'Set myBtn = page.NativeWebObject.Find("innerText", "Buy","BUTTON")
set myBtn = sys.browser("iexplore").page("*").find("Innertext", "Proceed to secure checkout", 906)
log.Message(myBtn)
' Checks if the button exists
If myBtn.Exists Then
myBtn.Click
Else
log.Error(BtnName & " Button does not Exist")
End If
End Sub