Chrome option
This commit is contained in:
@@ -8,21 +8,20 @@ ${BROWSER} chrome
|
|||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Begin Web Test
|
Begin Web Test
|
||||||
# Options Chrome pour tourner dans le LXC Jenkins (sans affichage)
|
# Crée un objet ChromeOptions
|
||||||
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
|
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
|
||||||
|
|
||||||
# Flags indispensables en conteneur
|
# ⚠️ Tous les arguments sont des positionnels, PAS des "nom=valeur"
|
||||||
Call Method ${options} add_argument --headless=new
|
Call Method ${options} add_argument --headless=new
|
||||||
Call Method ${options} add_argument --disable-dev-shm-usage
|
Call Method ${options} add_argument --disable-dev-shm-usage
|
||||||
Call Method ${options} add_argument --no-sandbox
|
Call Method ${options} add_argument --no-sandbox
|
||||||
Call Method ${options} add_argument --window-size=1920,1080
|
Call Method ${options} add_argument --window-size=1920,1080
|
||||||
|
|
||||||
# ⚠️ On force le chromedriver installé dans le LXC Jenkins
|
# Utilise le chromedriver installé dans le LXC Jenkins
|
||||||
Create Webdriver Chrome executable_path=/usr/local/bin/chromedriver options=${options}
|
Create Webdriver Chrome executable_path=/usr/local/bin/chromedriver options=${options}
|
||||||
|
|
||||||
Set Selenium Speed 0.3s
|
Set Selenium Speed 0.3s
|
||||||
Set Selenium Timeout 7s
|
Set Selenium Timeout 7s
|
||||||
|
|
||||||
|
|
||||||
End Web Test
|
End Web Test
|
||||||
Close All Browsers
|
Close All Browsers
|
||||||
|
|||||||
Reference in New Issue
Block a user