obaid_shirwani
11 years agoContributor
Getting null object in response of xPath
Hi guys, I am trying the following: //Set page to be the existing page: Works good. var page = Sys.Browser("*").Page("*"); //The following is working good and object i...
- 11 years agoEvaluateXPath returns VBScript-compatible arrays. To use the returned array in JScript, you need to convert it to a native JScript array like this:
var tmp = page.EvaluateXPath(...);
if (tmp != null)
{
var arr = (new VBArray(tmp)).toArray();
...
}
This is mentioned in the EvaluateXPath documentation.