Exemple #1
0
        public bool ValidateItemExistsInCart(int itemNumberOnList)
        {
            IWebElement item = ShoppingCartSection.FindElement(By.XPath($"//div[contains(@class, 'sc-list-item')][{itemNumberOnList}]"));

            return(item.IsDisplayed());
        }
Exemple #2
0
        public void DeleteItemFromShoppingCart(int itemNumberOnList)
        {
            IWebElement item = ShoppingCartSection.FindElement(By.XPath($"//div[contains(@class, 'sc-list-item')][{itemNumberOnList}]"));

            item.FindElement(By.XPath("//span[contains(@class, 'sc-action-delete')]/span/input")).Click();
        }