Ask a Question

Button detected as disabled during test run and causing test failure

Frequent Contributor

Button detected as disabled during test run and causing test failure


I am having an issue with controls that is causing my test to fail. Control in question is a button on a pop up dialog. The button only becomes enabled after the user enters text into a text field

During my test the click operation on this button fails with TestComplete reporting that the button is disabled.


The button is visually enabled onscreen, if I use the object spy the "Enabled" Property for the button displays "True".

I have tried adding WaitProperty method for the button, choosing the Enabled property of the button under test and setting the Property value as boolean "True".

I have also tried using the Exists method for the button.

In both cases TestComplete appears to check these methods, pass them, then move on to the button click method and fail with the "button is disabled" message.


This also happens on at least one other pop up dialog in my system and I am currently assuming it will happen on all where a button is disabled until the user enters data in some other field.


I've checked the other issues here on the community and solutions suggested there i.e. use WaitProperty, have not resolved the problem


Browser: Firefox

OS: Windows 10

Oh also, I'm running keyword tests, I've no scripting/programming experience.


Any help would be greatly appreciated

Community Hero



How do you find your control (using NameMapping, Find() method)?


Probably you have a several number of similar buttons in the DOM. TestComplete finds the first one, and if it is disabled, your test fails.

Frequent Contributor

Hi baxatob,


I'm using namemapping, I have manually mapped all the controls in the application so the tree structure is unique for each Add button in the system, so I don't think there can be any confusion for TestComplete, but then again I don't know enough about mapping of controls to say that for certain.

When the pop up dialog is displayed Testcomplete appears to ignore all controls on the webpage in the background i.e. I can't highlight or use object spy to view properties of those controls. So I'm assuming that it can only work/detect the controls  the pop up dialog and on this there is only 1 button, the one I'm trying to perform a click on.


I don't have any issue highlighting the control from within the test either, when I right click within the test steps and click highlight the correct step is highlighted.


Is there any way that I can see which button TestComplete is using/taking the properties from during the test run?


Please fire the popup dialog on your page, then go to Name Mapping -> right click on your mapped button and select Highlight on the screen. Whould it be highlighted?

Frequent Contributor

Yup it's highlighted when I follow those steps.


Full steps for me are as follows:

generate dialog

enter text in text field

click outside text field, on the dialog, to trigger button activation

right click namemapping item and choose highlight, button control is highlighted onscreen.

Please show how your element is presented in Object Browser (including its properties).

Frequent Contributor

Screenshot attached

Hm... Strange...

Can you please also provide a screenshot of the relevant piece of your keyword test where the reference to the button is obtained and the button is clicked then?

  /Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.

Here you go

Showing results for 
Search instead for 
Did you mean: