Finding web object doesn't work for Google Chrome
Read this article on the support website: https://support.smartbear.com/viewarticle/75851/
As our test script kept failing from using a series or mapped object, we decided to use EvaluateXPath and/or Find methods to lookup the test object and execute certain actions. This solution worked nicely on IE and Firefox but NOT in Chrome. Below is a sample script I am trying to run:
Sub Test5()
Dim page, arr, i
Set page = Sys.Browser("*").Page("*")
arr = page.EvaluateXPath("//INPUT[contains(@name, 'CardNumber')]")
If Not IsNull(arr) Then
arr(i).SetText("X")
Else
Log.Error "Nothing was found."
End If
End Sub
It returns a "Microsoft VBScript runtime error. Type mismatch: 'arr' ..." error message which I believe is due to the EvaluateXPath being unable to get any value.
Is there any better way to find an object on Google Chrome?
Using:
TestComplete 11.10.1005
Google Chrome 45