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 not working in _near
Hi All,
I'm trying to use a regular expression in an _assertExists that uses _near and it's failing. Whereby:
This works:
_assertExists(_link(/^Type.*/));
But this doesn't:
_assertExists(_cell("Some Text", _near(_link("/^Type.*/"))));
Is there a problem using reg exp in an _near and/or is there another way to do this?
Thanks
I'm trying to use a regular expression in an _assertExists that uses _near and it's failing. Whereby:
This works:
_assertExists(_link(/^Type.*/));
But this doesn't:
_assertExists(_cell("Some Text", _near(_link("/^Type.*/"))));
Is there a problem using reg exp in an _near and/or is there another way to do this?
Thanks
Comments
Regular expression will work with _near API. Can you please post the HTML code of the page that you were testing? That help us to know exactly what you are trying to do.