18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
How to identify fields with XPATH
Hi,
In the web application we are trying to test, the html is generated and the ids are thus not stable as they can change when the page is modified.
The html however contains the attribute "data-testtoolid" which is a stable identifier. see example of input:
<input id="F_13" name="CC" class='FIELDInputEdit' data-testtoolid='yourname' type="text" style="width: 185px;">
Testtools like selenium can identify this thru xpath.
Can someone tell me how this would work with SAHI Pro?
Thanks,
In the web application we are trying to test, the html is generated and the ids are thus not stable as they can change when the page is modified.
The html however contains the attribute "data-testtoolid" which is a stable identifier. see example of input:
<input id="F_13" name="CC" class='FIELDInputEdit' data-testtoolid='yourname' type="text" style="width: 185px;">
Testtools like selenium can identify this thru xpath.
Can someone tell me how this would work with SAHI Pro?
Thanks,
Comments
you can try with the following syntax:
var $Text= _byXPath("//input[@data-testtoolid='yourname']" )