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 WebDriver automation using Java. I have done manual testing before and want to learn automation. I just know the basics of Core Java.

Could you please suggest me the Core topics which one would require to perform test automation using Selenium WebDriver?

What topics on which a tester must concentrate and what topics to ignore in java programming?

share|improve this question

8 Answers 8

Java

My experience is, that the basics of Java suffice to start developing test cases with Selenium 2 / WebDriver. Myself started developing of Selenium test cases with a basic knowledge about Java. The more test cases I wrote and solutions I had to find, the more I leaned about the programming language.

Unit Testing Framework (JUnit, TestNG)

Write some simple unit tests (without Selenium) to learn the basics of the unit testing frameworks and read the documentation. The more complicated stuff of the framework comes automatically by writing tests with Selenium 2 / WebDriver.

Apache Maven

Apache Maven is an Build Management Tool. It can manage dependencies (libraries). But it is also very useful for testing stuff. It exists plugins to create test reports, run tests in parallel or configure the test runs.

share|improve this answer
1  
+1 for the unit testing framework section. With WebDriver in particular you'll have to get used to many of the features of these frameworks. –  joshin4colours Sep 2 '14 at 20:21
    
+1 to the answer. I'd say the more you know about concepts of java the more comfortable you will be to write more complex tests. Usually you might be writing test frameworks for unit testing where you will require to write many complex conditions and decisions, so a good knowledge and hands-on experience of java will always be a good plus for you. –  TESTacy Jul 10 at 16:54

The answer to this depends on what level of coding do you wish to do? How complex will your test script be?

To begin with you might want to learn basic/core java and then keep on improving with practice and seeking help from others to put together complex scripts to test complex software.

share|improve this answer
  • Learn the basics of JAVA(any programming language) - Door step to Selenium2 automation

    Assuming you have a basic understanding of HTML, CSS

  • Learn about locators, simple selenium commands and try to automate simple functionality
  • Once you got to know how to control the browser, you can go on using the frameworks like TestNG(preferrable) or JUnit
  • Learn Javascript, which will help you in many ways, with Selenium it is more powerful

If you have done the above things well, you will go yourself by the advanced usage of selenium to automate complex functions.

So, you will go across, Different Testing frameworks, Logs, CI, Build Management and so on.

Happy automation:)

share|improve this answer

I think you will benefit if you research the following:

  1. Basics of Java (as pointed out in other answers): You may need to know some libraries/concepts like:

    • Apache POI: To read/write to excel files, in case you read test data from an excel file and pass it to your test script
    • XML Parsing: In case you pass test data from an XML file
    • TestNG: Testing framework with a reporting structure.
    • ATU Graphical Reporter (just a suggestion): This goes well with TestNG and gives great reports.
  2. XPath and Css-Selectors - Here, I mean you should be able to construct well formed XPath and CSS-Selectors.

  3. External Tools like AutoITx4Java or AutoIT - You may need to know this tool in case a part of your script deals with Windows popups.

share|improve this answer

Important Java concepts with respect to Selenium :

  1. Condition statement and looping statement
  2. Exception Handling
  3. Methods of String class
  4. List and Set
  5. Upcasting and Runtime Polymorphism
  6. OOPs concepts with examples
share|improve this answer
1  
As it stands, your answer doesn't add anything to the existing responses - please edit your answer to give more information for each listed item. –  Kate Paulk Jun 23 at 11:04

The level of Java knowledge depends on what you want to do with Selenium.

You may just want to write some simple test automation scripts in which case basic Java knowledge is sufficient.

If you want to make your test automation code re-usable, then object oriented programming concepts are important.

If you want to create a framework, then learn advanced Java concepts like polymorphism, abstract classes, interfaces, etc.

See more on this topic on http://test-able.blogspot.ca/2015/08/how-much-java-do-i-need-to-learn-for-selenium.html

share|improve this answer

For Working on Selenium WebDriver with Java , you can focus on below Java concept and other related stuff, I am just giving you bigger picture.

  • Java Basics (oops concept & programming concept)
  • Java Collection Framework
  • Java FileOperations (using apache POI or Jexcel) , ExceptionHandling , logger would be plus point.
  • Junit or TestNG to start with unit testing so you can assert your test cases.
  • Need to have knowledge of HTML basics so you can use them in selection elements using various mechanism mainly with ID , Xpath , CSS Selector which is vital for working with selenium framework ( Most Important).
  • for Day to day working efficiency need to learn Jenkins(conceptually) , Maven & repository operations.
  • There are several standard framework is used by companies so look at them and understand it , like Page object pattern, Hybrid framework , keyword Driven framework etc.

Let me know if you have any doubt in it.

share|improve this answer

You should Know Object oriented Concepts by using any programmig language like: C#, Java etc.
You should know the Collection framework in C# or Java to handle the objects.
You should know the HTML.
You should know JavaScript.
you should know Excel manipulation in java or C#.
you should know how t connect database in java JDBC and in c# ADO.Net.
You should know the JUnit or NUnit Testing framework and their Annotations or Attribute.
You should know any IDE either Eclipse or Visual Studio. External tools like Point position or AutoIt v3 etc...

share|improve this answer
1  
This list makes no sense. JDBC? really. To create Selenium test you do not need knowledge of the database and then even SQL would be more usefull. I have never used Excel while creating tests. Which IDE you use is also irrelevant. Collection framework? Never heard of it, your list contains specifics for your environments you worked with. –  Niels van Reijmersdal Jun 8 at 8:27
    
1- means that you are you are not fully aware about any Object Oriented Programming features collections. As you spoke about List what is list? it is an one type of collection. Have you ever user Set, HashTable,List,vector these are comes under collection. 2- If your are using Test driven Framework then your test data is present in Excel Sheet. Are you agree with my answer. same like that if you are accessing data from any database using SQL. Make Sense. –  Avinash Pande Jun 9 at 13:52
    
Basic required programming knowledge should include: if/then/else, OO classes, property and method, variable types like ints, booleans and arrays. You specific named it "the Collection framework", when Googling I hit the JCF which I never used. Better would be best practices like the Page object model: code.google.com/p/selenium/wiki/PageObjects –  Niels van Reijmersdal Jun 9 at 14:33

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.