I’ve discovered a new tool which I find quite cool: Selenium IDE.
Selenium is a plugin for firefox which allows to automate actions on a web browser in a similar manner that microsoft excel allows you to record macros and them play them back. This can be very useful if on your day to day you manually repeat the same actions on a web application, for example downloading every day the status reports from the company issue management tool in excel to check the top outstanding issues.
To get selenium up and running just follow these simple steps:
- with firefox, open https://addons.mozilla.org/en-US/firefox/addon/favorites-selenium-ide/ and download by clicking on “Add to firefox”, click on Install and restart Firefox.
- Open Selenium IDE from your firefox browser by clicking on the top right icon called “Open menu”, click on Developer, and click on “Selenium IDE”, you should see your selenium IDE window pop up.
- As the Selenium IDE window opens, it’s ready to record your first test, open a tab in firefox, go to http://www.rogeliorodriguez.net , right click and select “assert Title”
- go back to the Selenium IDE window and click on the green Arrow with a dash, you will see that the action has been replayed and that the test has passed successfully.
- To test that this works we can change the assertion so we can check that with the wrong title the assertion fails
- change the assertion to “wrong title” and click on the green arrow with a dash again. you will now see that the test fails, as expected, proving that the assertion works.
- That’s it, you are now set to start using selenium IDE, explore the rest of the commands available with right click. In a future post I will investigate how to integrate this with Java programming so you can perform more complex tests.