Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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?

Thanks!

share|improve this question
add comment

9 Answers 9

up vote 11 down vote accepted

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.

An Airlines Company website is also a good option. You can try this one. It is complicated enough: http://www.lufthansa.com/online/portal/lh/ua/homepage

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.

share|improve this answer
    
+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. –  dzieciou Apr 27 at 16:13
add comment

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.

Here are three sites designed for people to test. I talk about them at "Free Sites For Practicing Your Web Testing" ( http://www.allthingsquality.com/2011/11/sites-for-practicing-your-web-testing.html )

ParkCalc Widget http://adam.goucher.ca/parkcalc/

Brown & Donaldson (B&D) online brokerage Web site http://bdonline.sqe.com/

The Mercury Tours Web Site http://newtours.demoaut.com/

Another alternative is to build your own web site, using whatever tools you have at your disposal. I've done something similar to create non-web applications for people to test:

Triangle Test #1 http://www.allthingsquality.com/2009/01/wintask-triangle-test.html

Triangle Test #2 http://www.allthingsquality.com/2009/01/wintask-triangle-test-2.html

Hellp World Test http://www.allthingsquality.com/2009/02/wintask-hello-world-test.html

share|improve this answer
    
Why should I request permission to run tests on a website? What's the difference between this and clicking many times on their pages? –  l19 Dec 16 '13 at 2:35
    
@I19 - The difference is a human using their site versus a tool. Websites are designed for business purposes, not for your testing pleasure. –  Joe Strazzere Dec 16 '13 at 12:41
    
Its part of the terms of service. –  ThorinII Dec 17 '13 at 3:34
    
Aren't Web crawlers for search engines doing the same? And then Deep Web crawlers crawling data through Web forms? –  dzieciou Apr 27 at 16:18
1  
@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 Strazzere Apr 27 at 16:37
show 1 more comment

A very good exercise is to practice on a real project. I advice you opensource projects. It allows you to practice and to contribute to the community reporting bugs.

Personally I am practicing on OpenClinica (https://www.openclinica.com). You can start doing easy tests until more complex one.

share|improve this answer
add comment

Here is a simple test scenario that should still prove educational:

  1. Log in to your webmail provider.
  2. Send yourself an email.
  3. Verify that the email was received.
  4. Delete the email.
  5. Log out of the email provider.
share|improve this answer
add comment

'Welcome to the Internet' provides a ton of good real world examples that you can use to write some test automation code against.

http://the-internet.herokuapp.com/

share|improve this answer
add comment

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.

Regards, ToolsQA

share|improve this answer
    
Your site is very good. Well Structured code with examples on selenium Automation. Welcome to SQA Again! –  Siva Jun 4 at 17:17
add comment

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.

share|improve this answer
    
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". –  Bruce Dec 14 '13 at 0:26
add comment

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).

share|improve this answer
add comment

You can also use "ActiTime" application (http://www.actitime.com/). You can use this application without internet (Without internet this application will work as an web-based application).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.