예제 #1
0
        public void ClickAddToCart()
        {
            var count = Convert.ToInt32(_quantityInCart.Text);

            if (BaseAsserts.IsElementPresent(By.CssSelector("[name*=Size]")))
            {
                SelectProductSize("Medium");
            }
            BaseSelenium.Click(_addToCart);
            BaseWaitings.WaitTextPresent(_quantityInCart, (count + 1).ToString());
        }
예제 #2
0
 public bool CheckExternalLinks()
 {
     foreach (var v in _externalLinksList)
     {
         var oldWins = WebDriver.Driver.WindowHandles;
         var curWin  = WebDriver.Driver.CurrentWindowHandle;
         BaseSelenium.Click(v);
         BaseWaitings.WaitOpenNewWindow(oldWins);
         BaseSelenium.SwitchToWindow(WebDriver.Driver.WindowHandles.Last());
         WebDriver.Driver.Close();
         BaseSelenium.SwitchToWindow(curWin);
     }
     return(true);
 }