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.
wildcards
Are there any wildcard options when dealing with sahi objects? For example, on one page, I have to click a button. This button however, is always a different name like:
_image("edit_comment_63950")
_image("edit_comment_63951")
_image("edit_comment_63952")
So i'll never really know what # should be on the tailing end and there are no other elements on the page I can get the number from.
Are there any wildcards I can do like
_image("edit_comment_*")?
If not, can anyone think of a decent work around?
Thanks!
_image("edit_comment_63950")
_image("edit_comment_63951")
_image("edit_comment_63952")
So i'll never really know what # should be on the tailing end and there are no other elements on the page I can get the number from.
Are there any wildcards I can do like
_image("edit_comment_*")?
If not, can anyone think of a decent work around?
Thanks!
Comments
http://sahi.co.in/forums/viewtopic.php?id=1447
I didn't tested it yet, but I think that your code might be something like this:
_image(/edit_comment_.*/)
I am also having same problem. I have list of radio buttons with their names as say, "abc[1]", "xyz[1]", "pqrs[2]", "lmn[4]" etc.
The index no. tailing behind is not static. But this wildcard solution is not working for me. I also tried _click(_radio(0,_near(_cell("/abc/"))));
But this also is not working. Kindly help in this issue.
Also, in my application I have few text boxes, which also are identified as "searchtext", "searchtext[1]", "searchtext[2]"...... by Sahi controller.
Code lines: _setValue(_textbox("/searchtext/"), "any input");
OR
_setValue(_textbox(/searchtext.*/), "any input");
do not work in this situation.
Any help will be much appreciated.
regards,
nagar
If anyone has any idea, Kindly help in this problem.
Regards,
nagar
Can you please send us the HTML snippet of the radio buttons to support@sahi.co.in?
Which browser are you using to set a value? What version of Sahi are you using?
Also, could you please check if you are able to set values on other textboxes and other browsers.
Regards
Sumitra