Beispiel #1
0
 public static void CheckedCheckBox(this IWebElement element, bool check)
 {
     WaitHelper.WaitElementToBeClickable(element);
     if (!IsCheckBoxChecked(element) && check)
     {
         element.Click();
     }
     else if (IsCheckBoxChecked(element) && !check)
     {
         element.Click();
     }
 }
Beispiel #2
0
 public static void SelectElementByText(this IWebElement element, string text)
 {
     try
     {
         WaitHelper.WaitTextToBePresentInElement(element, text);
         new SelectElement(element).SelectByText(text);
         Reporter.AddLogStep(text);
     }
     catch (NoSuchElementException ex)
     {
         Reporter.AddLogStep(ex.Message);
         throw new NoSuchElementException();
     }
 }