Browser
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user