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.
Dynamic IDs
I have been asked to identify a test tool. Sahi seems like a good candidate.
As I've seen in other postings, there have been similar related posts...
The problem is the id's are highly dynamic. When in a recording session they won't be the same when playing back. I think I can handle this 99% of the time if I can always have the Sahi recorder Access the element as an index (e.g. checkbox(1)...) during the recording phase.
The point is if we can't do this it will take significant experimentation to make sure we're getting the correct control. Do you have some option I can set which causes it to always use the index? Sometimes it does sometimes it doesn't.
Thanks...
As I've seen in other postings, there have been similar related posts...
The problem is the id's are highly dynamic. When in a recording session they won't be the same when playing back. I think I can handle this 99% of the time if I can always have the Sahi recorder Access the element as an index (e.g. checkbox(1)...) during the recording phase.
The point is if we can't do this it will take significant experimentation to make sure we're getting the correct control. Do you have some option I can set which causes it to always use the index? Sometimes it does sometimes it doesn't.
Thanks...
Comments
You can always change the script later to use the index.
But if you want the recorder to ignore the id, open sahi/htdocs/spr/concat.js and replace the function isIgnorableId with this: Basically we are asking the recorder to ignore id based identification of ANY element. You can tailor it to your needs using any condition you want.
Regards,
Narayan
Syntax:
_checkbox(<identifier value>[,<identifier type>])
e.g.:
_click(checkbox("checkid1", id);
_click(checkbox("good", name);
_click(checkbox(1, index);
RR