Have you ever wanted to learn a little bit about Selenium WebDriver but didn’t know where to start?
Turns out there are some good tips / tutorials online for practicing writing Selenium in Ruby. One of those is a newsletter called Elemental Selenium that has something like 70 tips. You can sign up for the newsletter if you want but what I found valuable was to look at several of these tips, write them out (don’t copy + paste) and make sure you understand what they do. Turns out when you do this and you commit them to a repo, you can reference back to them when you come across similar problems in the future.
Simply stated the goal is to:
- Read through the Elemental Selenium tips and then write (don’t copy + paste) the code yourself.
- Try running the tests locally and see how things work.
- Once you’ve written a few tests, refactor those example tests so they become more DRY (don’t repeat yourself). Create page objects.
- Commit these to your own repo on GitHub.
Putting your code on GitHub will have the benefit of showing you can write (at least) basic selenium automation. Although this code may not be your “best foot forward” given how new you’ll be, it is a starting point. As you learn more and make improvements, your code will reflect this.
These tips are (hopefully) grouped correctly but within each group there may be some variance. See if you can do one or two per day (some will be easier than others). If you see something interesting and want to jump to it immediately, go for it.
Beginning to Intermediate:
- Tip #5 – Select from a Dropdown
- Tip #1 – Upload a File
- Tip #13 – Work with Basic Auth
- Tip #26 – Run tests in the Cloud
- Tip #35 – Verifying Locators
Intermediate to Advanced:
- Tip #7 – Use a Page Object
- Tip #47 – Waiting
- Tip #10 – Retry Test Actions
- Tip #19 – Data Driven Tests
- Tip #44 – Exception Handling
- Tip #12 – Opt out of A/B Tests
- Tip #27 – Running tests in Parallel
I’ve recommend a few people try this exercise because I found it valuable. Am I missing anything else? Has anyone else done something similar but in a different language or tool?