Browser
This commit is contained in:
@@ -1,21 +1,23 @@
|
|||||||
*** Settings ***
|
|
||||||
Library SeleniumLibrary
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${BROWSER}= chrome
|
|
||||||
${URL}= https://automationplayground.com/crm/
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Begin Web Test
|
Begin Web Test
|
||||||
# set selenium speed .2s
|
# Crée un objet ChromeOptions côté Python
|
||||||
set selenium timeout 10s
|
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
|
||||||
open browser ${URL} ${BROWSER}
|
|
||||||
|
|
||||||
#resize browser window for recording
|
# Arguments nécessaires pour LXC / Jenkins
|
||||||
set window position x=0 y=0
|
Call Method ${options} add_argument --headless=new
|
||||||
set window size width=1280 height=1040
|
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
|
End Web Test
|
||||||
Close All Browsers
|
Close All Browsers
|
||||||
|
|||||||
Reference in New Issue
Block a user