I want to learn Selenium, but I don't know what to code. Sure, I can throw Google some queries, I can fill out some forms, press buttons, find divs and links, etc. But I think this stuff is pretty basic.

What would be more "advanced" ideas to try out? Can you give real-life examples?

9 Answers
9

For hacking WebDriver without real production purpose, you need to find some task that really motivates you.

Don’t forget, WebDriver – is not only about test automation, people use the tool (not so widely) for many different purposes: crawling some data from websites, semi-automating real job-related tasks.

For instance, a girlfriend of friend of mine is working for real-estate agency. The part of her job was to update actual ads. She has to find all ads belong to her account, and re-save each on multiple different web-sites.
My friend wrote a Console application with C# and WebDriver which automates those actions:

Login to website
For each page in the account:
Open and resave each ad on the page.

When I mentoring new person whom is willing to learn test automation, I give him/her a task to write a program which gathers the trains information (availability and ticket prize) on the Ukrainian Railways website.http://booking.uz.gov.ua/en/
They have really tricky undocumented prizing; which depends on the days of the week and the amount of time before the departure.
The program should log information about all available trains on the time when it started.

And you can also write a console application which sends new messages to twitter. Of course, it should support image attachments. That could be a good candidate to post on Hacker News.
I haven’t heard someone had done something like that before.

+1 for using Selenium to automate everyday tasks. When learning Selenium I did something similar, to automate compiling my daily work reports (how many ours spent on what) in our internal Web app. Filling up data manually was boring and the app required too many clicks, so I used Excel to define data to enter.
–
dzieciouApr 27 '14 at 16:13

You should never run automated tests against a website for which you don't have permission. The site owner could consider it a denial of service attack or an attempt at hacking. In theory, they could sue you or ask your ISP to drop you. If you do this using a company computer, you could put your company in jeopardy. Don't.

@dzieciou - perhaps, but so what? When analyzing web logs, it's pretty easy to determine if the hits are coming from web crawlers or not. You aren't a web crawler, thus you are at risk of being put on a black list.
–
Joe StrazzereApr 27 '14 at 16:37

Try www.onlinestore.toolsqa.com to practice automation. It is a Ecommerce website specially built up for Automation testers, place free order and recieve emails confirmation, add to cart, product details , product listings , you can extend your test.

Plus it is a responsive website so mobile automation is also possible.

Selenium Automation Framework is also given for the beginners based on the same application to learn and practice on www.toolsqa.com.

Rather than looking for sites to practice on, one thing that I've found useful is if you yourself, or with the help of class-mates, work-mates, build one to test with. This allows you to kind of design your own curriculum as far as learning about the driver and attached frameworks, but, can also give you a good insight into better design patterns and improve your other testing skills.

I like this answer less because if a single person both writes and tests the page, you will make it very easy to test - unique 'id' attributes on all the useful elements, for example. A lot of the more interesting functionality and learning can only be done on a page where everything isn't "just right".
–
BruceDec 14 '13 at 0:26

To gain some experience on Selenium, I installed Jenkins locally and tried to write some scripts through the different screens of the product. I found it a good choice because I could work without a network connexion (install is local, I don't rely on external web site) and when I wanted to show my work or ask for help, the people I would show my work to were familiar with the SUT (because we all use Jenkins down here).