public bool IsDisplayRequiredFieldsMessage() { IWebDriver driver = BrowserManager.GetInstance().WrappedDriver; IList <IWebElement> elements = driver.FindElements(requiredFieldsMessage); return(elements.Count > 0); }
public NotebooksPage CkickToAddToCartButton(string name) { By notebookAddToCartLinkBy = By.XPath(string.Format(addToCartLinkLocator, name)); Link link = new Link(notebookAddToCartLinkBy); BrowserManager.GetInstance().MoveToElement(notebookAddToCartLinkBy); link.Click(); return(this); }
public void SendKeys(string text) { if (text == null) { throw new ArgumentNullException("Invalid Text: Text cannot be null."); } WaitForElementExists(by); BrowserManager.GetInstance().SendKeys(by, text); }
public ChartPage ClickToChartButton() { BrowserManager.GetInstance().MoveToElement(cartButton); Button button = new Button(cartButton); BrowserManager.GetInstance().Refresh(); button.Click(); return(new ChartPage()); }
public NotebooksPage ClickToShowAllLinks() { int firstScrollPoint = 0; int secondScrollPoint = 500; BrowserManager.GetInstance().ScrollBy(firstScrollPoint, secondScrollPoint); Link link = new Link(showAllLinks); link.Click(); return(this); }
public void SetSelected(bool selected) { if (selected) { if (!isSelected()) { BrowserManager.GetInstance().Click(by); } } else { if (isSelected()) { BrowserManager.GetInstance().Click(by); } } }
public void GivenIOpenTheMainPageOfTheWebsite() { BrowserManager.GetInstance(); homePage = new Page(); homePage.Open(); }
public string GetText() { WaitForElementIsVisible(by); return(BrowserManager.GetInstance().GetText(by)); }
public void Submit() { WaitForElementExists(by); BrowserManager.GetInstance().Submit(by); }
public void Clear() { WaitForElementIsVisible(by); BrowserManager.GetInstance().Clear(by); }
public void GetText() { WaitForElementIsVisible(by); BrowserManager.GetInstance().GetText(by); }
public void Click() { WaitForElementToBeClickable(by); BrowserManager.GetInstance().Click(by); }
public bool isSelected() { WaitForElementIsVisible(by); return(BrowserManager.GetInstance().IsSelected(by)); }
public Page Open() { BrowserManager.GetInstance().NavigateToUrl(Url); return(this); }
public void Inizialize() { BrowserManager.GetInstance(); homePage = new Page(); BrowserManager.GetInstance().NavigateToUrl(homePage.Url); }