Hey there! any question in your mind? Ask It Now!.

Popular Categories

How to start with selenium for automation testing?

+2 votes
asked in Software Testing by nitin (810 points)
i want to automate my test case with the help of selenium .my application is web based.

2 Answers

+1 vote
answered by testertom (160 points)
First of all go here http://docs.seleniumhq.org/ download selenium and its doc.

you can write script with selenium web driver and automate your tes cases.

All info about how to write functions you will get in this doc.
+1 vote
answered by देवऋषि नारद
Before getting into the automation with the help of selenium, try to get little theoretical knowledge about selenium.
Here we are assuming that you have basic knowledge of selenium.
Automation includes just three simple approaches.

1. Writing a logical test case  (You are done with this)
2. Coding
3. Execution.

Let's focus on Point 2.

If you want to buy a pen from a shop then shopkeeper must have the pen to sell. Same thing happen here if you want to use the selenium you must have selenium package in you IDE.

Now you have a pen to write Test Cases or a love letter to your girlfriend and if you are writing love letter then you will write "Hi Dear" or "Hi Name (Mee)"  ;). It means you are calling it.

So here with selenium, for using it you have to import the selenium packages. For example-
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

Now get back to your Test Case which was the first task. In that test case, you must have written "Open Browser and Go to www.twitter.com(any web application)".

So Now In the main class now call the browser and hit the URL. example :
WebDriver driver = new FirefoxDriver();


This might be the basic example of selenium for newbies. In above explanation, you can add new things after calling the browser and hitting URL.  You can perform many actions on the webpage. Like you can log in to FB or any other site using send keys and many other methods

Keep exploring and Keep posting your doubt.

Related Questions

+4 votes
0 answers 216 views
+1 vote
1 answer 698 views

Not a Member yet?

Ask to Folks Login

My Account
268 Folks are online
1 members and 267 guest online
Your feedback is highly appreciated