Exemple #1
0
 /// <summary>
 /// Simulates the user interaction of clicking this button on UI.
 ///
 /// If the button is not visible (default) or does not exist, this method will keep waiting until it appears or until
 /// the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached.
 /// </summary>
 /// <exception cref="NoSuchElementException"> if this button is still not visible (default) or does not exist
 ///     after the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached </exception>
 /// <exception cref="StaleElementReferenceException">Thrown when the <seealso cref="IWebElement"/> of this button becomes invalid
 ///     (unlikely unless the HTML tag of this button is refreshed while this method is invoked).</exception>
 public virtual void Click()
 {
     if (this.IsLocatedByTBD)
     {
         ByTBD.Log(this.Name + ".click()");
     }
     else
     {
         // Get the web element with the default implicit timeout and then click it.
         WebElement.Click();
     }
 }
Exemple #2
0
 /// <summary>
 /// Simulates the user interaction of submitting the web form that contains this text field.
 ///
 /// If the text field is not visible (default) or does not exist, this method will keep waiting until it appears or until
 /// the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached.
 /// </summary>
 /// <exception cref="NoSuchElementException"> if this text field is still not visible (default) or does not exist
 ///     after the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached </exception>
 /// <exception cref="StaleElementReferenceException">Thrown when the <seealso cref="IWebElement"/> of this text field becomes invalid
 ///            (unlikely unless the web page of this text field is refreshed while this method is invoked).</exception>
 public virtual void Submit()
 {
     if (this.IsLocatedByTBD)
     {
         ByTBD.Log(Name + ".submit()");
     }
     else
     {
         // Get the web element with the default implicit timeout and then
         // submit the form that contains this text field.
         WebElement.Submit();
     }
 }
Exemple #3
0
 /// <summary>
 /// Simulates the user interaction of unchecking this check box.
 ///
 /// If the check box is not visible (default) or does not exist, this method will keep waiting until it appears or until
 /// the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached.
 /// </summary>
 /// <exception cref="NoSuchElementException"> if this check box is still not visible (default) or does not exist
 ///     after the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached </exception>
 /// <exception cref="StaleElementReferenceException">Thrown when the <seealso cref="IWebElement"/> of this check box becomes invalid
 ///     (unlikely unless the HTML tag of this check box is refreshed while this method is invoked).</exception>
 public virtual void Uncheck()
 {
     if (this.IsLocatedByTBD)
     {
         ByTBD.Log(this.Name + ".uncheck()");
     }
     else
     {
         // Get the web element with the default implicit timeout.
         IWebElement webElement = WebElement;
         if (webElement.Selected)
         {
             webElement.Click();
         }
     }
 }