fayizkc
7 years agoOccasional Contributor
FindChildByXPath is not working on the object created by EvaluateXPath method
I created array of object by EvaluateXPath. When I loop to that object and use FindChildByXPath, not supporting this method error is appearing.
Here in the code.
var obj1 = MyWebpageObject.EvaluateXPath("//ul[@id='UserList']/li"); var arrObj = obj1.toArray(); for (var i in arrObj){ var objDate = arrObj[i].FindChildByXPath("//span[@id,'txt-date']") if(objDate) { BuiltIn.ShowMessage(objDate.contentText) }
When it is executing arrObj[i].FindChildByXPath, throwing an error as "Object doen't support this propertyt or method"