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 Link
Hi,
I was wondeirng if anyone knew if wildcards could be possible to use with links
example:
_click(_link("Electronic[2]"));
now sine the numeric values change everytime theres a new build by the framework would it just be as easy as placing a " * " after "Electronic*" ?
whats the best sollution to this problem ?
thanks
I was wondeirng if anyone knew if wildcards could be possible to use with links
example:
_click(_link("Electronic[2]"));
now sine the numeric values change everytime theres a new build by the framework would it just be as easy as placing a " * " after "Electronic*" ?
whats the best sollution to this problem ?
thanks
Comments
I'll try this one out !
_button("Save[1]")
second build we got the accessor tells me that the same object is now identified as:
_submit("Save")
now this seems to be greatly difficult to solve since not just the name of the object is being changed but also the object's identification ?
our framework assigns id's upon building, so I'm not sure what to do ???
what could be done?
I have the same problem, but not for a link object, for a select object. I try with " / ", but is not working =(
The code that i try is:
_setSelected(_select(/cb_/), "Option")
instead of
_setSelected(_select("cb_12345"), "Option")
There is a way to handle that?
Thanks
Put _highlight(_select(/cb_/)) in the Evaluate Expression box (in the recorder), click Test--> and see what you get.
Each browser had its own way of identifying the object thus playing back would fail in one.
and I'm only speaking about the _button() and _submit()
as for the [1] . this was set because of our builds.
_button("Save[1]")
_submit("Save")
Could you please confirm that, the same element is being identified as _button("Save") and _submit("Save") on different browsers?
I see this as a major bug because it prevents such a script from being reused, and needs to be fixed ASAP.
Regards,
Narayan
After trying what you said, I just realice that my real problem is that there is other object named "cb_field", so, when I do: _setSelected(_select(/cb_/), "Option") , is trying to select the option on the other object, and dont find it.
Do you think that I must create a new post explaining that problem? So, maybe, someone can help me on figure out how can I reference to the object that I want...
Thanks!
Try using index in that case.
eg. _setSelected(_select(/cb_[1]/), "Option"); or _setSelected(_select(/cb_[2]/), "Option");
to see if it works.
You will need to identify the index by hit and trial.
Regards,
Pankaj
If I set: _setSelected(_select(/cb_[1]/), "Option"); only works if the object is named as "cb_1xxxx".
Seems like:
_setSelected(_select(/cb_[1]/), "Option");
works the same than:
_setSelected(_select(/cb_1/), "Option");
There is a way to identify the object by any other property?
Thanks,
MagUi
When you mouseover that element, what does the "Alternative:" show? Paste that here and we can find an easy way to get to it.
-Narayan
See:
Accesor: _select("cb_22312")
Alternative: top.frames[0].document.getElementById('cb_22312')
The other object is always named as _select("cb_field") - alternative: top.frames[0].document.getElementById('cb_field') -
There is a way to avoid select nothing from a specific object (in this case from " _select("cb_field") ") and search for the next object that satisfies the condition of _select(/cb_/) ?
MagUi
We are basically matching cb_<digit> so that cb_field does not get selected.
Thanks all!
MagUi