Prechádzať zdrojové kódy

modification test checkout, utilisation de la fct add_tiem

Gogs 1 rok pred
rodič
commit
3fbd747350
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      test_sauce_demo_class.py

+ 1 - 2
test_sauce_demo_class.py

@@ -133,8 +133,7 @@ class TestSauceDemo:
         self.login()
 
         # ajout "Sauce Labs Bike Light" au panier -- A changer si Tiff implémente une fonction pour le faire
-        item_lamp = self.driver.find_element(By.ID, "add-to-cart-sauce-labs-bike-light")
-        item_lamp.click()
+        self.add_item("bike-light")
 
         # affichage panier -- A changer si Tiff implémente une fonction pour le faire
         panier_btn = self.driver.find_element(By.ID, "shopping_cart_container")