|
|
*** Settings ***
Library Selenium Library
*** Testcases ***
Login Should Succeed When the Correct Username and Password are Entered
Start Selenium
Server
Open Browser http://www.baidu.com/ chrome
Maximize Browser Window
Click Link link=登录
Input Text username user1
Input Text normModPsp password1
Click Button xpath=//input[@value=' 登录 ']
Page Should Contain user1
Close Browser
Stop Selenium Server
|
*** Settings ***
Library Selenium Library
Suite Setup Start Selenium Server
Suite Teardown Stop Selenium Server
Test Setup Open Browser http://www.baidu.com/ chrome
Test Teardown Close All Browsers
*** Testcases ***
Login Should Succeed When the Correct Username and Password are Entered
Maximize Browser Window
Click Link link=登录
Input Text username user1
Input Text normModPsp password1
Click Button xpath=//input[@value=' 登录 ']
Page Should Contain user1
|
*** Settings ***
Library Selenium Library
Suite Setup Start Selenium Server
Suite Teardown Stop Selenium Server
Test Setup Open Browser http://www.baidu.com/ chrome
Test Teardown Close All Browsers
***Variables*** @{username}= user1 user2 user3 ... @{password}= password1 password2 password3 ...
*** Testcases ***
Login Should Succeed When the Correct Username and Password are Entered
Maximize Browser Window
Click Link link=登录
Input Text username @{username}[0]
Input Text normModPsp @{password}[0]
Click Button xpath=//input[@value=' 登录 ']
Page Should Contain @{username}[0]
|
***Settings*** Resource /path/to/file.txt |
*** Keywords ***
Setup Test
Open Browser Open Browser http://www.baidu.com/ chrome
Maximize Browser Window
|
*** Settings ***
Library Selenium Library
Suite Setup Start Selenium Server
Suite Teardown Stop Selenium Server
Test Setup Setup Test
Test Teardown Close All Browsers
***Variables*** @{username}= user1 user2 user3 ... @{password}= password1 password2 password3 ...
*** Testcases ***
Login Should Succeed When the Correct Username and Password are Entered
Click Link link=登录
Input Text username @{username}[0]
Input Text normModPsp @{password}[0]
Click Button xpath=//input[@value=' 登录 ']
Page Should Contain @{username}[0]
*** Keywords ***
Setup Test
Open Browser Open Browser http://www.baidu.com/ chrome
Maximize Browser Window
|
*** Keywords ***
Setup Test
Open Browser Open Browser http://www.baidu.com/ chrome
Maximize Browser Window
Enter Username [Arguments] ${username}
Input Text uname ${username}
Enter Password [Arguments] ${password}
Input Text pwd ${password}
Click the Login Button
Click Button login
Login Is Successful
Page Should Contain Welcome
|
*** Settings ***
Library Selenium Library
Suite Setup Start Selenium Server
Suite Teardown Stop Selenium Server
Test Setup Setup Test
Test Teardown Close All Browsers
***Variables*** @{username}= user1 user2 user3 ... @{password}= password1 password2 password3 ...
*** Testcases ***
Login Should Succeed When the Correct Username and Password are Entered
Open Login Page
Enter Username @{username}[0]
Enter Password @{password}[0]
Click the Login Button
Login Is Successful @{username}[0]
*** Keywords ***
Setup Test
Open Browser Open Browser http://www.baidu.com/ chrome
Maximize Browser Window
Enter Username [Arguments] ${username}
Open Login Page Click Link link=登录
Input Text uname ${username}
Enter Password [Arguments] ${password}
Input Text pwd ${password}
Click the Login Button
Click Button login
Login Is Successful [Arguments] ${username}
Page Should Contain ${username}
|