Roelof Albers
Read all my blogsAutomated testing is buzzing around everywhere, so I decided to join the party. Below are the results of my first test.
For this test I used Robot Framework with Selenium Library. This is one of the best options to test a web application.
- Robot Framework (https://github.com/robotframework/robotframework and http://robotframework.org/)
- Selenium Library (https://github.com/robotframework/SeleniumLibrary/)
- PyCharm IDE (https://www.jetbrains.com/pycharm/) (Optional, you can use every text editor you want)
- Chrome Driver (https://pypi.org/project/chromedriver_installer/) (Optional, used by the robot framework to start Chrome)
Documentation This is a simple test with Robot Framework
Library Selenium2Library *** Variables ***
${SERVER} http://google.com
${BROWSER} Chrome
${DELAY} 0 *** Keywords ***
Open Browser To Google
Open Browser ${SERVER} ${BROWSER}
Maximize Browser Window
Google Should Be Open
Set Selenium Speed ${DELAY} Google Should Be Open
Location Should Contain www.google.com Search For Acorel
Input Text lst-ib Acorel
Press Key lst-ib \13 Result Should Contain Acorel
Wait Until Page Contains www.acorel.nl 10 s *** Test Cases ***
Check if Acorel is still on Google
Open Browser To Google
Search For Acorel
Result Should Contain Acorel
[Teardown] Close Browser
- Inside the Settings you can add a description and include external libraries or other resources (i.e. robot files).
- The Variables can be defined and used in the your Keywords.
- Keywords are functions/methods that can be called from a Test Case or another Keyword.
- Test Cases are (ofcourse) test cases that can be run with the framework.