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

Setting Disabled via JS is failing

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 25 Oct 2010, 11:58 PM
Hello,

A custom ASP.NET AJAX component's code is setting an element's disabled property to true.  How do I check this with Web UI Test Studio?  I thought it might set the attribute disabled to disabled, but its set to '', and so it must be evaluatable only through JS code.  How do I perform that check?

Again, it's a custom ASP.NET AJAX component using the ASP.NET AJAX framework, so I have a companion client-side script doing the work.

Thanks,

Brian

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 01 Nov 2010, 10:17 PM
Hi Brian Mains,

If you want to invoke JavaScript from your test code, we have documentation how to invoke JavaScript, and how to read values returned.

You can also test the disabled property using code like this:

HtmlInputButton btn = Find.ById<HtmlInputButton>("Button1");
Assert.IsTrue(btn.BaseElement.OuterMarkup.Contains("disabled"));

All the best,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or