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.

how to get access to className of element?

tower120tower120 Members
edited June 2011 in Sahi - Open Source
Hi!

I try to do something like this:

if ( _link("variableDataNextLnk").className != "disabled" ){
_alert("do something");
}

The problem is I always see alert.

But when I do:
_alert( _link("variableDataNextLnk").className );

I see correct className

Comments

  • narayannarayan Administrators
    Use

    if (_condition(_link("variableDataNextLnk").className != "disabled")){
    _alert("do something");
    }

    Or do

    _set($className, _link("variableDataNextLnk").className);
    if ( $className != "disabled" ){
    _alert("do something");
    }
  • Thank you so much!!! Can you add this to your api list?
Sign In or Register to comment.