internal static bool isAlertPresent(WebDriver webDriver) { try { return webDriver.WebDriver.SwitchTo().Alert() != null; } catch (Exception) { throw new Exception("There is not alert present!"); } }
internal WebElement(WebDriver webDriver, OpenQA.Selenium.IWebElement webElement) { this._wd = webDriver; _webDriver = _wd.WebDriver; _webElement = webElement; }
public void Add(WebDriver webDriver, IList<OpenQA.Selenium.IWebElement> webElements) { var elements = base.Capacity += webElements.Count; foreach (var ele in webElements) base.Add(new WebElement(webDriver, ele)); }
internal Alert(WebDriver webDriver, OpenQA.Selenium.IAlert alert) { this.webDriver = webDriver; this.alert = alert; }
public WebElementCollection(WebDriver webDriver, IList<OpenQA.Selenium.IWebElement> webElements) : base(webElements.Count) { _webDriver = webDriver; foreach (var ele in webElements) base.Add(new WebElement(webDriver, ele)); }