コード例 #1
0
 public void LoginUser(string email, string password)
 {
     DriverHelper.Click(Locators.Button.CSS_loginButton);
     DriverHelper.SetText(Locators.Text.CSS_emailLogin, email);
     DriverHelper.SetText(Locators.Text.CSS_passLogin, password);
     DriverHelper.Click(Locators.Button.CSS_SignInButton);
 }
コード例 #2
0
        public void AddToCart(int index)
        {
            var selector = $"//ul[contains(@class,'product_list grid row homefeatured')] /li[{ index}]";

            DriverHelper.MouseOver(By.XPath(selector + "//a[@class='product_img_link']"));
            DriverHelper.Click(By.XPath(selector + "//a[@title='Add to cart']"));
            //mouse over
            //ul[@class="product_list grid row"] /li[2] //a[@class="product_img_link"]
            //hacer click
            //ul[@class="product_list grid row"] /li[2] //a[@title="Add to cart"]
        }
コード例 #3
0
 public void GoToHome()
 {
     DriverHelper.Click(By.CssSelector("#header_logo a"));
 }
コード例 #4
0
 public void TermsAndServicesCheck()
 {
     DriverHelper.Click(By.CssSelector("p.checkbox span"));
 }
コード例 #5
0
 public void ShippingCheckout()
 {
     DriverHelper.Click(By.CssSelector("button[name='processCarrier']"));
 }
コード例 #6
0
 public void AddressCheckout()
 {
     DriverHelper.Click(By.CssSelector("button[name='processAddress']"));
 }
コード例 #7
0
 public void SummaryCheckout()
 {
     DriverHelper.Click(By.CssSelector(".cart_navigation a[title='Proceed to checkout']"));
 }
コード例 #8
0
 public void PurchaseCheckout()
 {
     DriverHelper.Click(By.CssSelector(".button-container a[title='Proceed to checkout'] span"));
 }