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.
Object identifi using Sahi
HI,
In our application we are seeing that few of the object names get indexed sometimes. For eg, I have a structure like this
A
|_B
|__C
I have to validate if the structure looks like as above. I have used anchor function to validate this ie.,
if(_exists(_link(“B”), _under(_div(“A”))).
{
But sometimes the name of these object change and become A[1], B[1], A[2], B[2] etc. Hence it works only if the validation step is like if(_exists(_link(“B”), _under(_div(“A[1]”))).
I have also tried using regular expression to overcome this with (_exists(_link(“B”), _under(_div(“A”+”/./”))) and also tried using _strictVisisbility(true). But these also are not working. Please let me know what I am supposed to do?
Thanks,
v92
In our application we are seeing that few of the object names get indexed sometimes. For eg, I have a structure like this
A
|_B
|__C
I have to validate if the structure looks like as above. I have used anchor function to validate this ie.,
if(_exists(_link(“B”), _under(_div(“A”))).
{
But sometimes the name of these object change and become A[1], B[1], A[2], B[2] etc. Hence it works only if the validation step is like if(_exists(_link(“B”), _under(_div(“A[1]”))).
I have also tried using regular expression to overcome this with (_exists(_link(“B”), _under(_div(“A”+”/./”))) and also tried using _strictVisisbility(true). But these also are not working. Please let me know what I am supposed to do?
Thanks,
v92
Answers
http://qa.siliconindia.com/qa-expert/Sahi--Writing-Maintainable-Scripts-eid-53.html
http://qa.siliconindia.com/qa-expert/Sahi--Writing-Maintainable-Scripts-eid-53.html