Question

I have a form for which I try to write some tests. I have a problem, however: Is there any way to check, if a button is clickable or if it is "greyed out"? I tried looking for something like "Elements.IsActive", or "Clickable", but nothing is there.

I know that WatiN can throw an exception if it tries to click a button that isn't active, so there just HAS to be a way to check it before clicking it...

Can anyone help me out here?

Was it helpful?

Solution

if( browser.Button("id").Enabled)

    Console.Write("Enabled");

else

    Console.Write("Disabled");

you can try this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top