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.

Unable to get the disabled property of a link control.

travzillatravzilla Members
edited September 2013 in Sahi - Open Source
Hi, I had tried several of the tips you posted here to validate a disabled control. However I am not getting the expected validation result.

The current html code for the control I want to verify is this:

<a class="prjButton" title="New Project" id="newPrj" disabled="disabled">

<img src="images/explorer/new_project.png"> New
</img>
</a>

I tried this commands in sahi

_assertTrue(_link("newPrj").disabled);

This was for no avail, the system returns an Assertion Failed issue even that the control actually is disabled.

Kindly inform me of another alternative.

Answers

  • I forget to mention...

    The tag I input in my first post is contained inside a div that has an id defined. All the elements forms a "button". I have some situations to solve.

    The developer tends to use the same class for several objects and if I use the class instead of the id, sahi goes to validate the first object with class, if you can suggest me how sahi can validate the second, third or fourth element with the class name could be nice.

    Second, seems that sahi has problem to validate the ids of the controls and, at first hand, from all the elements of the div, sahi detects the most notorious one, the image, hence is hard to detect the link element.

    Thanks in advance.
Sign In or Register to comment.