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.

_assertContainsText fails when used toLowerCase()

sumeetsumeet Members
edited November -1 in Sahi - Open Source
Below statement fails with [Exception] [object Error]

_assertContainsText("exfr", _cell(_table("sessions"), 1, "Transaction Types").toLowerCase());

is this a bug, if not then what's the alternative

Comments

  • narayannarayan Administrators
    _cell(_table("sessions"), 1, "Transaction Types") returns an elementStub. You cannot do a toLowerCase() on that.

    You could do

    _assert(_getText(_cell(_table("sessions"), 1, "Transaction Types")).toLowerCase().indexOf("exfr") != -1);
Sign In or Register to comment.