/// <summary> /// Asserts that a specific control is on the current web page, with the "Visible" /// parameter set to "true." This method does not assert that the control is actually /// visible to the user. /// </summary> public static void AssertVisibility(ControlTester tester, bool expectedVisibility) { string not = expectedVisibility ? "" : " not"; string message = String.Format("{0} control should{1} be visible (HTML ID: {2}; ASP location: {3})", tester.AspId, not, tester.HtmlId, tester.Description); Assert(message, tester.Visible == expectedVisibility); }
/// <summary> /// For backwards compatibility; will be deprecated in the future. /// </summary> public static void AssertVisibility(ControlTester tester, bool expectedVisibility) { if (expectedVisibility) { WebAssert.Visible(tester); } else { WebAssert.NotVisible(tester); } }
/// <summary> /// For backwards compatibility; will be deprecated in the future. /// </summary> public static void AssertVisibility(ControlTester tester, bool expectedVisibility) { if (expectedVisibility) WebAssert.Visible(tester); else WebAssert.NotVisible(tester); }
private static string GetMessage(ControlTester control) { return string.Format( "Control {0} (HTML ID: {1}; ASP location: {2}) is disabled", control.AspId, control.HtmlId, control.Description); }
public ControlDisabledException(ControlTester control) : base(GetMessage(control)) { }
private static string GetMessage(ControlTester control) { return(string.Format( "Control {0} (HTML ID: {1}; ASP location: {2}) is disabled", control.AspId, control.HtmlId, control.Description)); }