This is a migrated thread and some comments may be shown as answers.

Test Studio is seeing a HtmlInputButton as Disabled even though its actually enabled

1 Answer 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
eugene asked on 04 Mar 2014, 08:29 PM

I'm encountering a problem with trying to click a HtmlInputButton that is enabled/disabled by a Javascript function controlled by another checkbox.  Bascially my test first checks a checkbox, which uses some javascript which makes this button become enabled, and tries to click this button that was just enabled.  I put a inspect DOM step right after my check checkbox step and before my find&click step and this is what the element looks like as seen by telerik:

<input disabled="" class="ui-corner-all ui-button ui-widget ui-state-default ui-button-disabled ui-state-disabled" id="finish-page" role="button" aria-disabled="true" type="button" value="Finish Page">

What the page actually looks like when I inspect element using Firebug after the checkbox check event:

<input type="button" value="Finish Page" id="finish-page" class="ui-corner-all ui-button ui-widget ui-state-default" role="button" aria-disabled="false">

The coded step I'm trying to use to click this Element:

HtmlInputButton Finish_Page_Button = Find.ById<HtmlInputButton>("finish-page");

It appears that 1)Telerik is incorrectly seeing the disabled attribute for this button and/or 2)Telerik ignores the MouseClick() event on disabled element.   Any guidance would be highly appreciated!


1 Answer, 1 is accepted

Sort by
Velin Koychev
Telerik team
answered on 10 Mar 2014, 08:46 AM
Hi Daniel,

Unfortunately I was not able to reproduce the issue you are describing. On my side, the mouse click was successfully executed both on the enabled and the disabled button. 

One thing you can try is to add as a first line in your code:

If this doesn't help, please provide us with a copy of your test and if it is possible grant us access to your application so we can reproduce the issue on our end and give you a solution.

If direct access is not possible, capture a Fiddler trace and attach it to this support ticket in a zip file. If you are unfamiliar with how to do so, this link will provide you with step-by-step instructions for download and use. If taking a Fiddler trace please be sure to:
1. Click Clear Cache first
2. Check Store binaries
3. Check Decrypt HTTPS traffic

Hope to hear from you soon.

Velin Koychev
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Velin Koychev
Telerik team
Share this question