1*** Settings ***
2Library Selenium2Library
3# Suite Setup Open browser ${URL} ${BROWSER}
4# Suite Teardown Close All Browsers
5
6*** Variables ***
7${SEARCH_URL} http://www.google.com
8${search_form} css=form[name=f]
9${search_query} css=input[name=q]
10${search_term} Lambdatest Login
11${click_lt_link} //h3[.='Login - LambdaTest']
12
13#Lambdatest URL details
14${LT_URL} https://accounts.lambdatest.com/login
15${BROWSER} Chrome
16${user_id} xpath=//input[@name='email']
17${password} xpath=//input[@id='userpassword']
18
19*** Test Cases ***
20Search for Lambdatest
21 Open Browser ${SEARCH_URL} browser=${BROWSER}
22 Wait Until Element Is Visible ${search_form}
23 Wait Until Element Is Visible ${search_query}
24 Input Text ${search_query} ${EMPTY}
25 Input Text ${search_query} ${search_term}
26 Submit Form
27 Click Element ${click_lt_link}
28
29Login on Lambdatest
30 Wait Until Element Is Visible ${user_id}
31 Wait Until Element Is Visible ${password}
32 # User defined keyword
33 Enter userid and password
34 Submit Form
35 Set Selenium Implicit Wait 5s
36 Close All Browsers
37
38*** Keywords ***
39Enter userid and password
40 Input Text name:email Testing@gmail.com
41 Input Text name:password Testing123
42
43Simulation of Action Chains
44 sleep 5s
45 Log "Click on Test Logs"
46 click element //span[contains(.,'Issue Tracker')]
47 sleep 5s
48 Set Selenium Implicit Wait 5s
49