-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathCommon.robot
28 lines (25 loc) · 1016 Bytes
/
Common.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*** Settings ***
Library SeleniumLibrary
Library LambdaTestStatus.py
*** Variables ***
${BROWSER} ${ROBOT_BROWSER}
&{lt_options} browserName=${browserName} name=RobotFramework Lambda Test buildName=Robot Build
${REMOTE_URL} http://%{LT_USERNAME}:%{LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub
${TIMEOUT} 30000
${IMPLICIT_WAIT} 9seconds
*** Keywords ***
Open test browser
[Timeout] ${TIMEOUT}
${options}= Evaluate sys.modules['selenium.webdriver'].${BROWSER}Options() sys, selenium.webdriver
Call Method ${options} set_capability LT:Options ${lt_options}
Open Browser https://lambdatest.github.io/sample-todo-app/
... browser=${BROWSER}
... remote_url=${REMOTE_URL}
... options=${options}
Set Selenium Implicit Wait ${IMPLICIT_WAIT}
Close test browser
Run keyword if '${REMOTE_URL}' != ''
... Report Lambdatest Status
... ${TEST_NAME}
... ${TEST_STATUS}
Close All Browsers