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.
Asserting The Class of a Link
Hmmm... struggling for too long with what is likely simple...
Given:
How do I assert that my _link("Admin") is also of class "top_on"?
Thanks,
Brian
Given:
<a href="/admin.do" class="top_on">Admin</a>
How do I assert that my _link("Admin") is also of class "top_on"?
Thanks,
Brian
This discussion has been closed.
Comments
You can use :
_set($linkClass, _link("Admin").className);
_assertEqual("top_on", $linkClass);
Regards
Sumitra
FWIW, this wouldn't be a bad built-in function... checking the class of an object... or maybe not.
Anyway, thanks,
Brian