Visible() public static method

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.
public static Visible ( Tester tester ) : void
tester Tester The tester for the control to check.
return void
Example #1
0
 /// <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);
     }
 }
Example #2
0
 /// <summary>
 /// Submit this form to the server.
 /// </summary>
 public void Submit()
 {
     WebAssert.Visible(this);
     browser.SubmitForm(this);
 }
Example #3
0
 /// <summary>
 /// Experimental.  May change or go away in future revisions.  Allows testers to
 /// assert that their control should be visible before some operations.  Using
 /// this method provides clearer error messages to users of the tester.
 /// </summary>
 protected void AssertVisible()
 {
     WebAssert.Visible(this);
 }