Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to find if a link is disabled in QTP? for textboxs and buttons it is easy, we can use GetROProperty and then give the property as disabled or ediable, etc. But in the case of links there is no such property which can show that it is disabled. How can we find out if it is disabled or not.

Thanks for the help in advance.

share|improve this question

A link (A tag) does not respect the "disabled" property as per the HTML spec, so if you have a "disabled" link then your developers have done something special to make it that way. Generally a "disabled" link is either not a link at all (text with styles applied to it such as a blue color and underline) or where the default behavior is overridden via javascript like so:


There are a number of other ways to get the effect as well. In order to determine whether a link is disabled, you would first have to determine how your developers actually faked the behavior of the "disabled" property. Based on what you find out, you may be able to determine whether the link is disabled by checking the class or other properties.

share|improve this answer
Thanks for the information. i will try it. – Tom Mar 11 '13 at 10:28

In my case if web link is disabled then it appears as WebElement if it is enable then it appears are Link and vice versa. So Using below concepts we can check either Web link is enabled of disbled.

if Browser().Page().WebTable().WebElemnt().exist(0) Then 
      Reporter.reprotevent Micpass, "Link Status", "Link is disabled."

else if Browser().Page().WebTable().Link().exist(0) Then
     Reporter.reprotevent Micpass, "Link Status", "Link is Enabled."
End IF
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.