Learn Selenium Step by Step

by seetaram on June 29, 2011

Selenium is an open source web application Test Automation tool.  Learning Selenium is very easy.  Anybody who worked on manual testing can easily learn Selenium.  We will try to explore how to learn Selenium Step by Step.

Selenium has three main tools – Selenium IDE, Selenium RC, and Selenium Grid.

First let us have a look at Selenium IDE

Selenium IDE – This is a Firefox Add-on (download from openqa download page).  Download Selenium IDE and install.

Once the IDE is installed, go to tools – > click Selenium IDE.  This opens up the Selenium IDE as below:

SeleniumIDE

Once this is done, close the Selenium IDE.

Now let us record a test:

  1. Open a new browser
  2. Navigate to www.google.com
  3. Click tools – > Selenium IDE (opens up IDE)
  4. click on Advanced Search link on Google search page
  5. type “selftechy” in “all these words:” edit box
  6. Select “20 results” from “Results per page” drop down
  7. Click Advanced Search button
  8. Click on File (on Selenium IDE) – > Save Test Case As and then give it a name and save the test case

SaveTest

Selenium IDE has recorded around 3-4 test steps.  Starting from the first step – > right click on each step and then click “Execute this command”.  Execute all the commands one by one.

Try to record some more tests with even more complexity and also record more number of tests.  Then try to execute each tests as explained above.  By this way you can become more comfortable with Selenium IDE.  After this exercise we can go ahead and try to learn exporting the tests in different formats such as Java, JUnit, PHP, C#, etc and also setting up the Selenium RC with Eclipse.

Below are the drawbacks of using Selenium IDE for record and execute tests:

  1. If all the test steps are executed together then the chances of tests getting failed is more because of page load time / objects taking more time to appear on the web page
  2. Parameterization is difficult and values should be hard coded
  3. Maintenance is much more difficult, etc.

I have explained using Selenium RC and configuring Eclipse with Selenium RC in my earlier post – Setting up Selenium with Eclipse

For detailed configurations have a look at the above post.

{ 16 comments… read them below or add one }

Kanti July 10, 2012 at 3:44 pm

Really Very helpful and I really appreciate you for web posting.

Reply

Amit October 12, 2012 at 1:12 pm

Is selenium also helpful for device testing?

Reply

seetaram August 22, 2013 at 6:34 am

Selenium is a web application testing tool

Reply

Harumraj February 23, 2013 at 5:31 pm

Its really very very useful not only that already i have an idea to learn selenium, now you are encourage me to do that. And one more help,
1.can you please tell me duration for this course?
2. which place is good to learn effectively.
3. shall we write script?

Pls reply to me as soon as possible.

Reply

seetaram March 7, 2013 at 6:05 am

Currently I am not conducting any Selenium course

Reply

prassanth April 10, 2013 at 12:23 pm

really it was very useful……may i know the clear explanation how to test sites by using java sir???

Reply

Venkateswara Reddy April 3, 2013 at 4:14 am

You are really good.
You have provided the maximum info…..:-)

Reply

deepa April 9, 2013 at 10:17 am

Can u please tel me in details how to use as i work on manuall testing, so not getting the steps,

Please send me the detailed steps

Reply

Sarita June 1, 2013 at 11:54 am

I tried to do the steps you have mentioned to record a test.
But when i right clicked on each step on Selenium IDE and clicked on Execute this command, i got this error at Log tab of Selenium IDE:

[error] Element //input[@value='Advanced Search'] not found.

Please help.

Reply

jaffer September 18, 2013 at 6:36 pm

what we need to learn if we want to use this tool profesionally for testing, and what else we can do with this tool

Reply

seetaram September 20, 2013 at 3:52 am

What we need to learn if we want to use this tool professionally — Learn automation and Java for coding

What else we can do with this tool — Purpose of this tool is Web application UI automation

Reply

Namrata October 24, 2013 at 7:18 am

I am success to create my first selenium IDE script. Thank you very much..

Reply

Divya November 6, 2013 at 11:05 am

Hi can you send me the process document for selinium i am very new to this

Reply

seetaram November 7, 2013 at 7:48 am

Seleniumhq.com has extensive documentation on Selenium

Reply

HariPrasad November 8, 2013 at 10:17 am

Hi Friends,

First time i am using selenium web driver using eclipse. Can any one please help me .. and please share related doc’s ….. Thank q

Reply

seetaram November 11, 2013 at 11:30 am

Go to http://docs.seleniumhq.org/

This has extensive documentation on Selenium

Also, you can refer the “Selenium” page of this blog

Reply

Leave a Comment

Previous post:

Next post:

Do you want to get updates on the recent articles written? Please subscribe to RSS feed or Email