I'm using Selenium WebDriver with C# I am trying to Assert if an input field is disabled. My Solution has two projects a Tests and a Test Framework.
Tests
Assert.IsFalse(ContactPage.FirstNameDisabled, "Error: First Name field is not enabled");
Test Framework
get
{
var firstName = Driver.Instance.FindElement(By.Id("FirstName"));
if (firstName.Enabled);
return false;
return true;
}
The above code passes whether the fields are disabled or not. I have tried to change around the IsFalse to IsTrue and also the return false, return true order however can't seem to get correct result I want.
Any help would be greatly appreciated.