DevPerera
9 years agoOccasional Contributor
I am getting more object number than actual values when I try to get text fields object counts
Hi All,
I just want to get number of text fields on particular web page.
Issue is I am getting more number than actual values.
Example if web page contain five text fields, then I am getting count as nine.
Here is code written in VB scripts.
Sub CountTextFields
PropArray = Array("ObjectType", "Exists", "VisibleOnScreen", "Visible", "Enabled")
ValuesArray = Array("Textbox", "True", "True", "True", "True")
obj = Sys.Browser("iexplore").FindAllChildren(PropArray, ValuesArray,2000)
If UBound(obj) >= 0 Then
Log.Message("Total number of text fields : " & (UBound(obj)))
Else
Log.Warning("No text fields found!")
End If
End Sub
................
Thanks
Dev