Created
April 30, 2015 10:40
-
-
Save udomsak/f90288364b44298d54f1 to your computer and use it in GitHub Desktop.
Basic usage of RobotFramework.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Settings *** | |
Library Selenium2Library | |
*** Variables *** | |
${BROWSER} firefox | |
${DELAY} 0 | |
${USERNAME} acme | |
${PASSWORD} acmeacme | |
${SERVER} uat.acme.com | |
${SEARCH URL} https://${SERVER}/admins | |
${LOGIN URL} https://${SERVER}/login | |
*** Test Cases *** | |
Login acmeweb | |
Open Browser To Login Page | |
Input Username | |
Input Password | |
Submit Credentials | |
Close Browser | |
Test Search Database | |
Search page Should Be Open | |
Close Browser | |
*** Keywords *** | |
Search Page Should Be Open | |
Open Browser ${SEARCH URL} ${BROWSER} | |
Input Text id=username ${USERNAME} | |
Input Text id=password ${PASSWORD} | |
Click Button login_button | |
Wait Until Page Contains LoggedIn timeout=10 | |
# Set Selenium Speed 3 | |
Click Element css=input[type="submit"] | |
Capture Page Screenshot | |
# Wait Until Page Contains LoggedIn timeout=10 | |
Select From List xpath=//select[@name='me__cde__exact'] 1C | |
Submit Form | |
# Wait Until Page Contains Logged timeout=10 | |
Capture Page Screenshot | |
Open Browser To Login Page | |
Open Browser ${LOGIN URL} ${BROWSER} | |
Maximize Browser Window | |
Set Selenium Speed ${DELAY} | |
Input Username | |
Input Text username ${USERNAME} | |
Input Password | |
Input Text password ${PASSWORD} | |
Submit Credentials | |
Click Button login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment