Forum Discussion

william_roe's avatar
william_roe
Super Contributor
9 years ago

FindChildByXPath Help

DevExpress has once again moved my cheese by moving the click event from an input to a cell for radio buttons.

 

How should the XPath be changed to get a reference to the cell instead of the textbox? The cell does not have an id so I'm guessing there a way to reference the parent but I figure out the exeact syntax  to do this.

 

obj = page.FindChildByXPath("//table[@id='tlEmployeeSiteAccess']//input[@id='SiteAccess"+AccessType[i]+"_"+SiteAccess[i]+"_S']", true);

 

  • baxatob's avatar
    baxatob
    Community Hero

    Hi, william_roe

     

    Adding "/.." to your element's XPath will focus you on the parent element.

     

    //element1/element2/element3/.. ---> focus on element2