From 96949cacfc89dd292641060d4dc40bb400ea922d Mon Sep 17 00:00:00 2001 From: Ssyleric Date: Thu, 20 Nov 2025 16:12:24 +0100 Subject: [PATCH] Browser --- Resources/Common.robot | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Resources/Common.robot b/Resources/Common.robot index e982c7e..bf175e5 100644 --- a/Resources/Common.robot +++ b/Resources/Common.robot @@ -1,21 +1,23 @@ -*** Settings *** -Library SeleniumLibrary - -*** Variables *** -${BROWSER}= chrome -${URL}= https://automationplayground.com/crm/ - - *** Keywords *** Begin Web Test -# set selenium speed .2s - set selenium timeout 10s - open browser ${URL} ${BROWSER} + # Crée un objet ChromeOptions côté Python + ${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver - #resize browser window for recording - set window position x=0 y=0 - set window size width=1280 height=1040 + # Arguments nécessaires pour LXC / Jenkins + 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 l’URL de la CRM + Go To ${URL} + + # Réglages SeleniumLibrary + Set Selenium Timeout 10s + Set Selenium Speed 0.2s End Web Test Close All Browsers