Browse Source

clean test_click_button_add_to_cart

vdiez-devweb 1 year ago
parent
commit
020e3fbbb0
1 changed files with 0 additions and 5 deletions
  1. 0 5
      test_saucedemo.py

+ 0 - 5
test_saucedemo.py

@@ -232,7 +232,6 @@ def test_click_button_add_to_cart():
     options = webdriver.FirefoxOptions()
     options.add_argument('--headless')
     driver = webdriver.Firefox(options=options)
-    
     # driver=webdriver.Chrome()
 
     url_sauce_demo = "https://www.saucedemo.com/"
@@ -255,7 +254,6 @@ def test_click_button_add_to_cart():
         badge_panier = driver.find_element(By.CLASS_NAME,"shopping_cart_badge")
         nb_product_initial = int(badge_panier.text)
     log.info(f"à la connexion, il y a {nb_product_initial} dans le panier")
-    slip(2)
 
     # Vérification clic button "add to cart" change de texte vers "remove"
     button_add = driver.find_element(By.ID,"add-to-cart-sauce-labs-backpack")
@@ -264,7 +262,6 @@ def test_click_button_add_to_cart():
     badge_panier = driver.find_element(By.CLASS_NAME,"shopping_cart_badge")
     nb_product = int(badge_panier.text)
     log.info(f"à l'ajout d'un article', il y a {nb_product} dans le panier")
-    slip(2)
     assert False == exists_element_by_id(driver,"add-to-cart-sauce-labs-backpack")
     assert True == exists_element_by_id(driver,"remove-sauce-labs-backpack")
     # et que le button "cart" a un badge avec n° incrémenté
@@ -279,6 +276,4 @@ def test_click_button_add_to_cart():
     # Vérification button "cart" a un badge supprimé car 0 articles dans le panier
     assert False == exists_element_by_classname(driver,"shopping_cart_badge")
 
-
-    slip(2)
     driver.quit()