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 check whether link is disabled or not

gaveyomgaveyom Members
edited January 2013 in Sahi - Open Source
Hi All,

my html code is

<a id="lnkProfLevelRYG7" disabled="disabled" title="Grade 7 &amp; Below" class="SmallText_Assessment_New">Grade 7 &amp; Below</a>

now i wanna know whether link is disabled or not, for this i have written sahi script like below


var $status;
_set( $status, _link("lnkProfLevelRYG7").disabled );

_debug($status);


it is displaying "null" for "$status" variable

plsss let me know, is there any thing wrong in my script ?

thanks in advance

Answers

  • Hi All,

    As per the previous post i have tried in this way, but it is returning "null"

    Can any 1 help me on this pls
  • Hi

    try to output the $link.attributes array. You could loop throug them like
    loop through $link.attributes
    when $link.attributes[index] matches "disabled"
    -> link is disabled 
    

    does this work?

    Regards
    Wormi
  • Hi globalworming,

    can u pls post 1 working example instead of pseudo code.

    thanks in advance
Sign In or Register to comment.