Skip to main content

Selenium WebDriver with Java

  • "an excellent course"
  • "I was finally able to pass a technical interview and I have just been hired as a Senior QA Engineer"
  • "Excellent coverage and code examples!"
  • "Highly recommend this course"
  • "Invaluable course for learning Selenium WebDriver - can't rate high enough!"

Also Available for Patreon Supporters As Individual Videos

This course has been highly rated by the people taking it.

"Superb course!...One of the best technical courses I've been on... Well done Alan!"

This course also available for free to Patreon supporters as part of the bonus training content available on Testerhq.com

Source Code

All the source code for the course can be found on Github. The code is available for both Selenium 3 and Selenium 4.

The docs folder of the above repo contains:

  • the slides for the online course
  • handouts and slides for physical workshops based on the online course content

Elevator Pitch

“Selenium WebDriver API in Java” is a hands on training course designed to teach the basics of the WebDriver API using Java.

The course is designed to build simply, and learn by doing, with continual elaboration of the API.

For each section we briefly discuss the theory, showing code examples to put it into context, then we do some hands on work followed by a discussion of the exercises and code reviews of worked examples.

We have chunked the API into Navigation, Interrogation, Manipulation and Synchronisation. As this helps lead the student through the basics of the API. Then we cover specific parts of the API which build on these e.g. JavaScript etc.

While the course is not designed to teach Java, only a basic level of Java is used and the principles of the code are explained as we go. This course is not suitable for people who have not programmed before, but people who have programmed in other languages should adapt quickly.

Tests are run from the IDE, and we use maven so that the final tests are suitable for execution from continuous integration.

Invaluable course for learning Selenium WebDriver - can’t rate high enough!”

Take the course

We want everyone to benefit from this course so have put it online for easy access.

Best technical course ever”

Full Video

A full 16 hour video is available on Youtube, but I’ve also split the course into 8 smaller chunks and sections below, which is the option I’d recommend working through.

Playlist and Resources

Section 1 - Overview And Getting Started

This is probably the least useful of all the videos since the installation of tools is easier now than ever before.

You could probably skip this video and use the instructions in our “Start Using Java JUnit 5” repo:

Watch on YouTube

Section 2 - Overview And Getting Started

This video provides and overview of Maven which is still quite useful. The IntelliJ sections and My First Test are probably outdated. You might find this Masterclass video more useful as a My First Test guide - it is an up to date example for getting started and quickly covers more advanced concepts that are covered in more depth in later videos of this course:

Watch on YouTube

Section 3 - Automated Execution Theory and JUnit

This video still has quite a lot of useful information. The basic theory overview and JUnit Introduction is still valid. Also the section on Data Driven Testing with JUnit. This is a different organisation than originally in the course but I thought putting the Data Driven section as a JUnit theory module made sense.

Watch on YouTube

Section 4 - Navigation and Interrogation with CSS and XPath Selectors

This video covers most of the Navigation content i.e. how to find elements and click on them using CSS Selectors and XPath Selectors. There is some fundamental knowledge here that still makes this a useful video to work through.

Watch on YouTube

Section 5 - Manipulation, Cookies, Alerts and JavaScript

I put most of the Manipulation content in this video, i.e. how do we make things happen by interacting with fields, elements, alerts and JavaScript. I think Cookies and JavaScript were covered later in the course originally but I think it makes sense to cover them as a manipulation technique.

Watch on YouTube

Section 6 - Synchronisation and Page Objects

think the Synchronisation section here has useful content but the rpesentation will be a little out of date since FluentWait is now the default interface exposed. But the general concepts are important and the Page Object coverage covers the basics although I wouldn’t recommend using the Page Factory approach at all. I also think creating your own waits has become easier, so it’s worth looking at the v4 code in the repo.

Watch on YouTube

Section 7 - Different Browsers, Driver Managers

This is probably another video where you could skip a lot of the initial content. The way that drivers are installed has changed and is now far easier. But the sections on Remote and Driver Managers might have some value.

Watch on YouTube

Section 8 - Appium, Continuous Integration and End Notes

The Appium content here will be well out of date, but the CI stuff is still OK and the videos cover some of the additional complexities that you might face when tackling cross browser automation in a Continuous Integration environment.

Watch on YouTube

Course Summary

WebDriver is the web automation tool of the moment. WebDriver skills are in demand. And when you understand the WebDriver usage patterns, that this course teaches, then you can increase your automation effectiveness.

An easy way to learn an automated test tool is by learning from the experiences of someone who knows how to use it. And that is what we do on this course.

Alan has been working with Selenium since 2007, and WebDriver since 2010. Over the years he has helped his staff learn Selenium using the methods in this course: discussing the theory, showing examples, hands on work, then critique and code reviews of worked examples.

In this course you will learn real world techniques associated with the WebDriver API based on experience of using WebDriver to automate production web sites.

This course focuses on the information you need to get productive with WebDriver. We don’t spend any time on the Selenium IDE, because you won’t use that in a production environment. We don’t spend any time on padding covering the architecture of WebDriver because you can find that information on the Web, and you don’t need to know it, to get productive.

Throughout the course we stress, and demonstrate, self learning strategies so that you don’t just learn the WebDriver API in depth, you also learn how to discover more on your own.

Online Course Outline Additions

We have taken a 2-3 day course and condensed it into 15+ hours of video, and it should take you about an additional 8 hours of self learning to do the exercises.

As well as the lectures, and the exercises, we also have over 200 slides to aid your self study, and 4500 lines of code to study (calculated using MetricsReloaded).

Course Goals and Objectives

  • By the end of this course you will have a working knowledge of the main parts of the WebDriver API
  • You will know how to create effective synchronisation routines to minimise intermittency
  • You will know how to investigate the functionality of WebDriver by looking in the WebDriver code
  • You will know how to craft effective assertions using JUnit and Hamcrest
  • You will understand how to run your tests on different browsers
  • You will know how to use the Selenium Grid
  • You will know how to use JavaScript with your tests
  • You will understand different locator strategies and know how to use both CSS selectors and XPath selectors

What People have said about the online course

Bey Melamed:

Everything you ever wanted to know about … but did not even know the questions Very comprehensive basic knowledge about Automation, Automation tools, Java & Tools, methodology and more… Usually ‘and more, much, much more’ is meaningless but in this case it is absolutely true. Aside of the basic Alan provides you with the compass and the map to explore more on your own. …

Melinda N:

Excellent coverage and code examples!

Kent Wood:

Superb I can’t rate this highly enough. It’s a superb example of a successful and engaging online course, which is no small accomplishment given the complexity of Java and Selenium…

Harsha Yogasundram:

Superb course! One of the best technical courses I’ve been on, really nailed the subject for somebody who’s technical but doesn’t know much Java. I’m already creating Webdriver frameworks in my current role and look forward to learning more in the future. Well done Alan!

Shamiul Mowla:

Best selenium tutorial around

Seth Barda:

Highly recommend this course ‘WebDriver basics with Java’

Jay Gehlot:

Invaluable course for learning Selenium WebDriver - can’t rate high enough! I can’t rate this course highly enough…..those interested in improving their skills and continually learning - this course is for you!

Agnes Pasztor:

One of a kind course on Selenium What I really appreciate is the insight on Alan’s automation testing mindset that would probably take years of experience and several mistakes to learn by oneself. That is something that you don’t normally find in a book…

Kam:

Excellent course I have come across in my 7 years of testing career I have been manual tester for years and I was looking for something online to learn automation testing … I fully recommend you to take this course.

Troy Best:

Reinvigorated my motivation for learning… Alan Richardson’s Selenium training videos have reinvigorated my motivation for learning. His manner and methods are simple, concise and real world. The best teacher I have had in years.

Amit:

Excellent Course Covers Webdriver in depth. Course content is best as it can be and Exercises give an opportunity to get hands on and achieve the maximum out of the course. One of the best courses in the market.

Kev McCabe:

Best technical course ever I went out and bought an iPad mini so that I could watch both of Alan’s courses and its been well worth it. … Alan covers a lot more than just Selenium pay the small fee and learn from IMHO the best in his field.

Steve Bartholomew:

Highly recommended This course is very well structured and builds the learning curve steadily. There are practical examples and exercises to put learning into practice and no short supply of humour along the way. Crucially, my interest levels were kept high right to the end.

Drew Cobb:

A “Must Have” type of course Alan Richardson walks you through every step necessary to get up and running with Webdriver / Selenium 2. … You will be able to create your own projects and write your own code in next to no time at all.

Ashish Kulkarni:

You will learn so much more than just Selenium WebDriver! … Well worth the money!

Intended Audience

  • Testers with some experience of programming
  • Programmers who want to learn browser automation
  • Selenium RC users who want to learn WebDriver

Course Requirements

  • Windows PC, although instructions should work on Linux or Mac (there are some Mac videos)
  • Open source and free tools: IDE, Java SDK, Firefox, Chrome