44 | | Open Browser http://${SERVER}/eden/default/user/login |
45 | | Input Text auth_user_email admin@example.com |
46 | | Input Text auth_user_password testing |
47 | | Click Button xpath=//input[@class='btn' and @value='Login'] |
48 | | Page Should Contain Logged in |
| 44 | Open Browser http://${SERVER}/eden/default/user/login #opens the browser to the argument url |
| 45 | Input Text auth_user_email admin@example.com #puts arg2 in textbox(arg1) |
| 46 | Input Text auth_user_password testing |
| 47 | Click Button xpath=//input[@class='btn' and @value='Login'] #Clicks the submit button |
| 48 | Page Should Contain Logged in #Checks if the text 'Logged in' is there or not |
68 | | As you can see, the name of the testcase is very descriptive and describes the objective. '''Open Browser''', '''Input Text''', '''Click Button''' and '''Page Should Contain''' are all keywords (functions) implemented in Selenium2Library. The beauty of writing tests this way is that they are easy to read and understand, thus eliminating the need to explain them. |
| 67 | * The testcase is in a separate file and has two sections - `*** Setttings ***` and `*** Test Cases ***` itself. |
| 68 | * As you can see, the name of the testcase is very descriptive and describes the objective. |
| 69 | * '''Open Browser''', '''Input Text''', '''Click Button''' and '''Page Should Contain''' are all keywords (functions) implemented in Selenium2Library. |
| 70 | |
| 71 | The beauty of writing tests this way is that they are easy to read and understand and that is one of aims as well, that even someone without the technical know-how can read and write tests. |