|
@@ -13,12 +13,13 @@ from selenium.webdriver.firefox.options import Options
|
|
from test_saucedemo import writeInInput
|
|
from test_saucedemo import writeInInput
|
|
|
|
|
|
|
|
|
|
-def connexion_saucedemo(username, passwd, arg="--headless"):
|
|
|
|
|
|
+def connexion_saucedemo(username, passwd):
|
|
log.info("Test du Login avec succès")
|
|
log.info("Test du Login avec succès")
|
|
options = webdriver.FirefoxOptions()
|
|
options = webdriver.FirefoxOptions()
|
|
- options.add_argument(arg)
|
|
|
|
|
|
+ options.add_argument("--headless")
|
|
|
|
|
|
driver = webdriver.Firefox(options=options)
|
|
driver = webdriver.Firefox(options=options)
|
|
|
|
+
|
|
driver.get("https://www.saucedemo.com/")
|
|
driver.get("https://www.saucedemo.com/")
|
|
|
|
|
|
username = driver.find_element(By.ID, "user-name")
|
|
username = driver.find_element(By.ID, "user-name")
|
|
@@ -28,7 +29,7 @@ def connexion_saucedemo(username, passwd, arg="--headless"):
|
|
writeInInput(inputElement=username, text=username)
|
|
writeInInput(inputElement=username, text=username)
|
|
writeInInput(password, text=passwd)
|
|
writeInInput(password, text=passwd)
|
|
login.click()
|
|
login.click()
|
|
- log.info("")
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
##### MANEL
|
|
##### MANEL
|
|
@@ -40,7 +41,7 @@ def go_to_checkout():
|
|
checkout = driver.find_element(By.CSS_SELECTOR, "#checkout")
|
|
checkout = driver.find_element(By.CSS_SELECTOR, "#checkout")
|
|
checkout.click()
|
|
checkout.click()
|
|
|
|
|
|
-#@pytest.mark.skip("Je veux pas le faire")
|
|
|
|
|
|
+@pytest.mark.skip("Je veux pas le faire")
|
|
def test_affichage_Checkout():
|
|
def test_affichage_Checkout():
|
|
log.info("Test de la redirection sur la page de Checkout")
|
|
log.info("Test de la redirection sur la page de Checkout")
|
|
|
|
|