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.
Use regular expression in _assertEqual
Hello,
Is it allowed to use a regular expression in the expected result of the _assertEqual function?
Example:
Output:
Thank you in advance for your help!
Is it allowed to use a regular expression in the expected result of the _assertEqual function?
Example:
_assertEqual(/.*cross.png/, _cell(0, _near(_cell("2008")), _under(_tableHeader("Lucht"))).firstChild.src, "2008 - Lucht");
Output:
Assertion Failed. 2008 - Lucht
Expected:[/.*cross.png/]
Actual:[http://tester-ubuntu.mmis.be:8282/prtr/images/icons/cross.png]
Thank you in advance for your help!
Comments
You cannot use a regular expression in the expected result of the _assertEqual function.
Regards
Sumitra