Example #1
0
        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);
        }
Example #3
0
 public void SendKeys(string text)
 {
     if (text == null)
     {
         throw new ArgumentNullException("Invalid Text: Text cannot be null.");
     }
     WaitForElementExists(by);
     BrowserManager.GetInstance().SendKeys(by, text);
 }
Example #4
0
        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);
        }
Example #6
0
 public void SetSelected(bool selected)
 {
     if (selected)
     {
         if (!isSelected())
         {
             BrowserManager.GetInstance().Click(by);
         }
     }
     else
     {
         if (isSelected())
         {
             BrowserManager.GetInstance().Click(by);
         }
     }
 }
Example #7
0
 public void GivenIOpenTheMainPageOfTheWebsite()
 {
     BrowserManager.GetInstance();
     homePage = new Page();
     homePage.Open();
 }
Example #8
0
 public string GetText()
 {
     WaitForElementIsVisible(by);
     return(BrowserManager.GetInstance().GetText(by));
 }
Example #9
0
 public void Submit()
 {
     WaitForElementExists(by);
     BrowserManager.GetInstance().Submit(by);
 }
Example #10
0
 public void Clear()
 {
     WaitForElementIsVisible(by);
     BrowserManager.GetInstance().Clear(by);
 }
Example #11
0
 public void GetText()
 {
     WaitForElementIsVisible(by);
     BrowserManager.GetInstance().GetText(by);
 }
Example #12
0
 public void Click()
 {
     WaitForElementToBeClickable(by);
     BrowserManager.GetInstance().Click(by);
 }
Example #13
0
 public bool isSelected()
 {
     WaitForElementIsVisible(by);
     return(BrowserManager.GetInstance().IsSelected(by));
 }
Example #14
0
 public Page Open()
 {
     BrowserManager.GetInstance().NavigateToUrl(Url);
     return(this);
 }
Example #15
0
 public void Inizialize()
 {
     BrowserManager.GetInstance();
     homePage = new Page();
     BrowserManager.GetInstance().NavigateToUrl(homePage.Url);
 }