diff --git a/Resources/Common.robot b/Resources/Common.robot index 3a65f1a..4b489b1 100644 --- a/Resources/Common.robot +++ b/Resources/Common.robot @@ -2,29 +2,15 @@ Library SeleniumLibrary *** Variables *** -${BROWSER} chrome -${URL} https://automationplayground.com/crm/ +${BROWSER} chrome +${URL} https://automationplayground.com/crm/ +${CHROME OPTIONS} add_argument("--headless=new");add_argument("--disable-dev-shm-usage");add_argument("--no-sandbox");add_argument("--window-size=1280,1040") *** Keywords *** Begin Web Test - # Crée un vrai ChromeOptions Python (comme pour end-to-end & amazon) - ${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver - - # ⚠️ Tous les arguments sont positionnels (pas de name=value) - Call Method ${options} add_argument --headless=new - Call Method ${options} add_argument --disable-dev-shm-usage - Call Method ${options} add_argument --no-sandbox - Call Method ${options} add_argument --window-size=1280,1040 - - # Utilise le chromedriver installé dans le LXC Jenkins - Create Webdriver Chrome executable_path=/usr/local/bin/chromedriver options=${options} - - # Ouvre directement l’URL CRM - Go To ${URL} - - # Réglages SeleniumLibrary + # Même logique que pour amazon : on laisse SeleniumLibrary gérer Chrome + Open Browser ${URL} ${BROWSER} options=${CHROME OPTIONS} Set Selenium Timeout 10s - Set Selenium Speed 0.2s End Web Test Close All Browsers