WatiN automatically resolve the disabled
attribute to determine if the control is enable or not.
So you can use the Enabled
property :
var disabledLink = browser.Link(
l => l.Id == "ButtonNext"
&& !l.Enabled);
Note that if you want to get any attribute value of a control, you can use the GetAttributeValue(string attributeName)
method.
For the disabled
attribute, WatiN convert the value to a boolean. This code is equivalent to the previous one :
var disabledLinkTrue = browser.Link(
l => l.Id == "ButtonNext"
&& l.GetAttributeValue("disabled") == Boolean.TrueString);