18 January 2026:


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

wgoriswgoris Members
edited November -1 in Sahi - Open Source
Hello,

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

  • SumitraSumitra Members
    Hi wgoris,

    You cannot use a regular expression in the expected result of the _assertEqual function.

    Regards
    Sumitra
Sign In or Register to comment.