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.
Regular expression have bugs in sahi
Hi,
_assert(_isVisible(_link("Send New Mail[1]")));
the [1] will get changed every time. I have tried using the
_assert(_isVisible(_link(/Send New Mail\[[0-9]\]/)));
Its failing.
_assert(_isVisible(_link("Send New Mail[1]")));
the [1] will get changed every time. I have tried using the
_assert(_isVisible(_link(/Send New Mail\[[0-9]\]/)));
Its failing.
Comments
_assert(_isVisible(_link("/Send New Mail/")));
Thanks for your suggestion.
As you suggested, I changed to
Unfortunately, its failing.
Assertion Failed
But it works for the zeroth index
If i have to check
_assert(_isVisible(_span("Send New Mail[0]")));
I can replace with
_assert(_isVisible(_span("/Send New Mail/"))); // This works
Any other way to handle the above scenario?
_assert(_isVisible(_span("/Send New Mail\[[0-9]\]/")));
_assert(_isVisible(_span(/Send New Mail/)));
The number between the brackets is added by sahi itself.
but the outcome of
_assert(_isVisible(_span(/Send New Mail/)));
and
_assert(_isVisible(_span("/Send New Mail/")));
is equal
_assert(_isVisible(_span("/Send .*New Mail/")));
Regards,
Bhavitha