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.
How to check whether a link is disabled or not
nandubijoor
Members
Hi Narayan,
I have a requirement like i need to click on a link only when clicking is allowed.
how to check whether given link is disabled or not.
Thanks
I have a requirement like i need to click on a link only when clicking is allowed.
how to check whether given link is disabled or not.
Thanks

Answers
Whenever i face the same issue with respect to disabling link using css or js, I will let you know because in my case they disabled it by not setting the target
Link is not disabled but the target is not set
for e.g- If 5349802 is a link in web page, it is defined like bellow without the target page
<a class="tablechardata"><center>5349802</center></a>
is there any solution to handle it?
Thank you
It's not returning any value. However, if i put "if loop" and try to compare with a null value then it goes to the else part as shown in the example below:-
var $check=_link("my-link").href; //returns an empty value
_log("Value of check is :-->" + $check);
if($check=="") {
_log("inside href col 0");
}else{
_log("Hello User");
}
The same code works in SAHI controller in "Evaluate Expression" section but not while running .sah file. Kindly help. Also if possible, tell me the data type.
Regards,
NanduBijoor