Forum Discussion

william_roe's avatar
william_roe
Super Contributor
9 years ago
Solved

More Help with XPath

I thought I had figured out this XPath thing but appararently not.   I'm trying to find the all div tags with the class "dxbButtonSys". A snippet of the browser inspect window is below.   I'm usi...
  • HKosova's avatar
    HKosova
    9 years ago

    william_roe wrote:

    Although all the elements of 'arr' are 'undefined' ....


    In JScript, you need to convert arrays returned by EvaluateXPath/QuerySelectorAll/FindAllChildren/etc methods to the JScript array format:

     

    arr = section.EvaluateXPath("//div[@class='dxbButtonSys']", true);
    if (arr != null) {
      arr = (new VBArray(arr)).toArray();
      Log.Message(arr.length);
    }
    else {
    Log.Message("Not found");
    }