This commit is contained in:
2025-11-20 16:40:37 +01:00
parent c55349f56e
commit a006e7a18e

View File

@@ -2,29 +2,15 @@
Library SeleniumLibrary Library SeleniumLibrary
*** Variables *** *** Variables ***
${BROWSER} chrome ${BROWSER} chrome
${URL} https://automationplayground.com/crm/ ${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 *** *** Keywords ***
Begin Web Test Begin Web Test
# Crée un vrai ChromeOptions Python (comme pour end-to-end & amazon) # Même logique que pour amazon : on laisse SeleniumLibrary gérer Chrome
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver Open Browser ${URL} ${BROWSER} options=${CHROME OPTIONS}
# ⚠️ 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 lURL CRM
Go To ${URL}
# Réglages SeleniumLibrary
Set Selenium Timeout 10s Set Selenium Timeout 10s
Set Selenium Speed 0.2s
End Web Test End Web Test
Close All Browsers Close All Browsers