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()); }
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); }