Selenium
Selenium is an easy-to-use and popular open source web applications Test Automation tool. Now a days’ lot of enterprises and ISVs (Independent Software Vendors) are looking out for open source tools. Open source communities are strong and getting support is also easier than for the licensed tools. Best example for this is LAMP (Linux, Apache, MySQL, PHP) which is used for web development and Selenium, used for test automation.
Selenium provides lot of features for test automation such as easy recording and play back of tests using Selenium IDE. Selenium supports multiple platforms, browsers, and programming languages. Especially, supporting multiple programming languages such as C#, Java, Ruby, Python, PHP, Groovy, etc is really fascinating.
This blog explains test automation with Selenium from the scratch in a tutorial manner. Even if a tester who does not have any prior automation testing experience can also start learning Selenium by going through the various posts in this blog. Blog posts cover lot of topics such as Recording tests with Selenium IDE, setting up Selenium with Eclipse, learning Java concepts and programming, understanding Selenese methods, writing data driven tests with MS excel, CSV, XML, etc. These topics are explained in a manner that will help the readers to understand the Selenium easily.
Below is an Index of Topics covered in the blog on Selenium:
Selenium Basics:
- What is Selenium?
- How Selenium identifies the objects?
- Write XPath to identify the objects
- Record tests using Selenium IDE
- Sample application to learn Test Automation – Sugar CRM (an open-source CRM application )
- Learn Selenium Step-by-Step
- Reading these articles together (one by one) is highly suggested to understand recording and running of Selenium Tests (sample application used in all these posts)
- Assertions for verifying test output
Selenium and JUnit:
- Setting up Selenium with Eclipse
- Introduction to JUnit 4 annotations
- JUnit 4 annotations – Before vs BeforeClass
- How to write Selenium tests with JUnit
Parameterization Techniques:
Properties, Logs, and Reports:
- Parameterize global settings using properties files.
- Create Logs for step-by-step analysis of test execution.
- Generate HTML reports / XML reports for detailed summary of test execution.
Test Automation Framework:
- What is Test Automation Framework
- What are the features of a framework
- Designing a framework for Test Automation
The above topics are covered in the various blog posts.

{ 14 comments… read them below or add one }
Hi seetaram,
How to handle pop up window with RC (java). I have confirm button to which i am clicking as
selenium.click(“css=input[type=\"image\"]“);
After this an popup appears.
I want to click cancel on the confirmation dialog but it always click on OK and proceeded to next page. The confirmation dialog not flashes even. If doing manually it is coming up fine.
Used selenium.chooseCancelOnNextConfirmation() but still it immediately goes to next page and cancel the things.
So my query is how to handle these pop ups with RC
Thanks
use selenium.chooseCancelOnNextConfirmation() for Javascript popup. use Selenium IDE and record once. Check the code Selenium IDE generates and find out is it selenium.selectWindow. Then code accordingly…
there is no dynamic wait method in web driver like selenium.waitforPageToLoad(),
could you please provide solution for that.
Thanks,
Sriram.
You can write your own method using while loop.
Example:
boolean status = true;
while(status){
if(driver.findElement(By.id()) != null){
status = false.
}
}
What is the syntax of XPATH,CSS,DOM ?(In Seleniuim)
Note: i got the Xpath but i am unable to find the CSS & DOM syntax in selenium. can you please explain for CSS & DOM.
please send it to my mail.
Thanks Seetaram …!!! It’s one of the most comrehensive site on the internet on selenium, covering all important topics at one single place.
Thank You for all your efforts
Best site ever! Thanks a lot and keep up the good work!
Hi Seetharam,
Many Many thanks for the detailed information about selenium. its helping us a lot. I am looking for documentation on integrating CI server with selenium tool. Can you please share any info on this
Regards,
Mini
I have not prepared any documentation as such.. I can provide you the steps to integrate with CI server such as Hudson…
1. Generate HTML reports through Ant
2. If the reports are JUnit reports Hudson has an inbuilt support for JUnit
3. Create a Job on Hudson and invoke the ant build file from Hudson job. Run the ant target from Hudson job
4. Configure the Hudson to display your test results. For this, there is an option on Hudson
excellent site !!!
I have created two java files ie
testscripts.tests.Login_version1
AddProcessingStep
And configured the xml file as shown below at default location.
Now Could you please explain how to run this test suite?
When i did right click on a specific java file , and run through test ng only that file will get executed.
Kindly have a look.
Thanks,
Priyanka
need more clarification.. on what you are doing…I am not able to understand what xml you have created…
Hi Seetharam,
Many thanks for details information provided for selenium in a simplest form.
But one thing to be rectified.
There is a mismatch between the name of the link and the launch page content.
for example the name of the link is “Export Tests into Java / JUnit and run in Eclipse” when i click this the link goes to the page “Selenium – Setting up Selenium & Eclipse”. here both are different pages.
kindly check and rectify these type of mistakes. sorry to pointing about this.
Many thanks for showing me the issue… definitely will be rectified…