protected void UncheckAction(WebBaseElement el) { if (IsCheckedAction((CheckBox)el)) ClickAction(el); if (IsCheckedAction((CheckBox)el)) throw Exception("Can't uncheck element. Verify locator for click or isCheckedAction"); }
public GetElementModule(WebBaseElement element, By byLocator = null) { Element = element; ByLocator = byLocator; if (IsNullOrEmpty(DriverName) && WebSettings.WebDriverFactory != null && !IsNullOrEmpty(WebSettings.WebDriverFactory.CurrentDriverName)) { DriverName = WebSettings.WebDriverFactory.CurrentDriverName; } }
private ISearchContext SearchContext(WebBaseElement element) { var searchContext = element.Parent is WebBaseElement ? SearchContext((WebBaseElement)element.Parent) : WebDriver.SwitchTo().DefaultContent(); return(element.Locator != null ? searchContext.FindElement(CorrectXPath(element.Locator)) : searchContext); }
protected void UncheckAction(WebBaseElement el) { if (IsCheckedAction((CheckBox)el)) { ClickAction(el); } if (IsCheckedAction((CheckBox)el)) { throw Exception("Can't uncheck element. Verify locator for click or isCheckedAction"); } }
protected void SetValueAction(WebBaseElement el, string value) { switch (value.ToLower()) { case "true": case "1": case "check": ((CheckBox)el).Check(); break; case "false": case "0": case "uncheck": ((CheckBox)el).Uncheck(); break; default: throw Exception($"SetValue not specified correctly {value}, expected: 'true','false','0','1','check','uncheck'"); } }
public CheckBox(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element: element) { }
protected BaseSelector(By optionsNamesLocator, By allLabelsLocator, List <IWebElement> webElements = null, WebBaseElement element = null) : base(optionsNamesLocator, webElements: webElements, element: element) { _allLabels = new GetElementType(allLabelsLocator, this); }
public GetElementModule(WebBaseElement element, By byLocator = null) { Element = element; ByLocator = byLocator; }
public TextField(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element: element) { }
public ActionInvoker(WebBaseElement element) { JDISettings.NewTest(); _element = element; }
protected bool IsCheckedAction(WebBaseElement el) { return ((CheckBox)el).IsCheckedFunc(el); }
public Clickable(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element) { }
private static void SetUpDropdownFromAnnotation(WebBaseElement instance, FieldInfo field) { var jMenu = field.GetAttribute<JMenuAttribute>(); if (jMenu == null || !typeof(IMenu).IsAssignableFrom(field.FieldType)) return; SetUpMenu((Menu)instance, jMenu); }
public Selector(By optionsNamesLocatorTemplate, By allOptionsNamesLocator, List <IWebElement> webElements = null, WebBaseElement element = null) : base(optionsNamesLocatorTemplate, allOptionsNamesLocator, webElements, element) { }
public GetElementClass(WebBaseElement element) { _element = element; }
public SelectableElement(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element: element) { }
public ElementsActions(WebBaseElement element) { _element = element; }
private static void SetUpTableFromAnnotation(WebBaseElement instance, FieldInfo field) { var jTable = field.GetAttribute<JTableAttribute>(); if (jTable == null || !typeof(ITable).IsAssignableFrom(field.FieldType)) return; SetUpTable((Table)instance, jTable); }
public FileInput(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element: element) { }
private static void SetUpMenuFromAnnotation(WebBaseElement instance, FieldInfo field) { var jDropdown = field.GetAttribute<JDropdownAttribute>(); if (jDropdown == null || !typeof(IDropDown).IsAssignableFrom(field.FieldType)) return; SetUpDropdown((Dropdown)instance, jDropdown); }
public GetElementModule(WebBaseElement element, Pairs <ContextType, By> context = null) { _element = element; DriverName = JDISettings.DriverFactory.CurrentDriverName; Context = context ?? new Pairs <ContextType, By>(); }
public Button(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element:element) { }
protected bool IsCheckedAction(WebBaseElement el) { return(((CheckBox)el).IsCheckedFunc(el)); }
public Text(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element:element) { }
public DatePicker(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element: element) { }
public ActionScenarios SetElement(WebBaseElement element) { _element = element; return(this); }
public GetElementModule(WebBaseElement element, By byLocator = null) { Element = element; DriverName = JDISettings.DriverFactory.CurrentDriverName; ByLocator = byLocator; }
public GetElement(WebBaseElement element) { this._element = element; }
private static void FillFromAnnotation(WebBaseElement instance, FieldInfo field) { SetUpTableFromAnnotation(instance, field); SetUpMenuFromAnnotation(instance, field); SetUpDropdownFromAnnotation(instance, field); }
public DatePicker(By byLocator = null, IWebElement webElement = null, WebBaseElement element = null) : base(byLocator, webElement, element:element) { }
protected BaseSelector(By optionsNamesLocator, List <IWebElement> webElements = null, WebBaseElement element = null) : base(optionsNamesLocator, webElements: webElements, element: element) { }