cancel
Showing results for 
Search instead for 
Did you mean: 

Button is Disabled

Frequent Contributor

Button is Disabled

Hi

 

I constantly get 'button is diabled' error message and my test fails. I have attached the screenshot of the object properties for your reference. Not sure why but Visible & VisibleOnScreen is set to 'False'.

 

Thanks

3 REPLIES 3
Community Hero

Re: Button is Disabled

The "Enabled" property on your Add Link button is false... so, because it's not enabled, you can't click on it... that is, at least, how TestComplete is seeing it.  Also, Visible is false... so, something about the object doesn't match what's on screen.

 

Double check and make sure that you don't have more than one window open... or that there's not another copy of that window open somewhere... or that there isn't some sort of additional "phantom" copy open somewhere... basically, TestComplete is doing what it is designed to do... report that it's attempt to click on the indicated button failed because the properties of the button don't allow for it.

 

 


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: Button is Disabled

But it seems that test complete is bit tempramental with its approach. At times it clicks the button and at times just gives the disabled error.


@tristaanogrewrote:

The "Enabled" property on your Add Link button is false... so, because it's not enabled, you can't click on it... that is, at least, how TestComplete is seeing it.  Also, Visible is false... so, something about the object doesn't match what's on screen.

 

Double check and make sure that you don't have more than one window open... or that there's not another copy of that window open somewhere... or that there isn't some sort of additional "phantom" copy open somewhere... basically, TestComplete is doing what it is designed to do... report that it's attempt to click on the indicated button failed because the properties of the button don't allow for it.

 

 


 

Community Hero

Re: Button is Disabled

Ah, so you don't "constantly" get the error. ;-)

 

What you've described is a timing issue.  I'm guessing, from your description, that there's some action or event performed before your attempt to click the "Add Link" button which should enable that button (like filling in a text field, highlighting something, etc).

 

So, my guess is that you need to add some sort of wait method or process in before your attempt to click the "Add Link" to wait until it is enabled before you attempt to click on it.  Look into using WaitProperty on the button to wait for Enabled to be true. 


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Watch the new Interview