3.6 out of 5
3.6
270 reviews on Udemy

Selenium WebDriver with Python – Basics to Intermediate

Learn step by step how to automate web applications using selenium webdriver with an easy to learn programming language.
Instructor:
Gabiste Akoua
2,742 students enrolled
By the end of this course, you will be able to build solid selenium automated tests using Selenium Webdriver Python API.
You will learn how to install selenium on different platforms (Windows, Mac OS X or Linux Ubuntu).
You will know how to locate web elements using XPATH or CSS Selectors.
You will learn how to apply actions (clicking an element, sending keys to an element, selecting an element from a drop-down list etc) to web elements.
You will learn how to queue selenium actions using ActionChains.
You will know how to organize your selenium tests code in packages and how to wrap selenium calls.
You will learn how to leverage concepts like Page Objects and UI Mapping in order to make your selenium tests code maintainable.
You will know how to use nose to collect selenium tests without the need of manually creating a test suite file.
You will learn how to distribute your selenium tests using Selenium Grid.
You will learn the best practices when writing your selenium tests.

*******************************************************************************************************

Take this course and develop solid selenium tests quickly using a scripting language like Python.

This course covers:

  • Selenium installation on several platforms (Windows, Mac OS X and Linux Ubuntu)
  • Locating elements on a web page using XPATH, CSS SELECTORS etc.
  • The Selenium Webdriver Python API
  • Organizing and refactoring your selenium tests code
  • Implementing Page Objects and UI Mapping in order to make your selenium code maintainable.
  • Collecting selenium tests automatically using Nose so that you don't have to create manual test suite files.
  • Distributing Selenium Tests using Selenium Grid
  • The best practices when writing selenium tests

All concepts are explained using hands-on examples. You will apply your skills on a real web app built especially for this course.

*******************************************************************************************************

"""
This course helped me get an interview at Harvard University.

I have been trying to learn Selenium for ages, but I just wasn't getting it. Then I took a Python course, followed by this course. It was such fun! Because of this course, I was able to upload some coding samples navigating to my Github account, where I was navigating to the login screen and signing in using a test account I created.

The IT people at Harvard University liked it so much they are giving me an interview for a junior automated testing role. I would not be able to have been eligible without this course.

""

T.J. Maher

""
As title says Basics to Intermediate, it covers all

Very Good course, It covers everything from basic setup to best practices of writing solid tests. Best part is the use of unittest and nosetests which is very much required if we have lot of test cases to execute.

course will not only help beginners to start learning the basic concepts but will also help intermediates to understand best practices and managing test suites.

waiting for advanced section :)"

Ayush

""

If you want to learn Selenium with Python Bindings, Take this Course

Awesome course by an extremely helpful and well-organized professor. Clear instructions, lots of good examples and exercises, thorough, logical. Can't say enough good things. Gabiste is very helpful if you have any questions as well. Can't recommend enough.

""

Matt Vaccaro


*******************************************************************************************************

Introduction

1
Welcome

Welcome message and tutorial quick overview.

2
Prerequisites

This lecture highlights what you should know before taking this course.

3
Selenium Overview

This lecture briefly describes each component of selenium.

4
Navigating Course Materials

This lecture explains how to navigate this course. Where to get the installation instructions PDF? where to get the locator strategies (Xpath or Css Selectors) cheat sheets? etc.

Installation and Configuration on Mac OS X

1
Tools Overview (Instructions attached)

In this lecture, I give a brief description of the tools that we are going to install. I am also attaching the installation instructions as downloadable content.

2
Installing Firefox Add-ons

In this lecture, I show you how to install Firebug, FirePath and Selenium IDE.

3
Installing ChromeDriver

In this lecture, I show you how to install the ChromeDriver server which is needed to run tests on Chrome.

4
Installing Java

In this lecture, I am installing the Java SDK.

5
Installing Pip

In this lecture, I show you how to install pip which a tool for installing and managing python packages.

6
Installing Selenium

In this lecture, I am installing selenium from the command line.

7
Overwriting the "PYTHONPATH"

In this lecture, I am overwriting the "PYTHONPATH". This is important as later on we are going to use relative imports.

Installation and Configuration on Windows

1
Tools Overview (Instructions attached)

In this video, I give you a brief description of the tools that we are going to install.

2
Installing Firefox Add-Ons

In this video, I show you how to install Firebug, FirePath and Selenium IDE.

3
Installing Python 2.7

In this video, I show you how to install and configure Python 2.7 on your Windows environment. I am using Windows 7 Professional for this installation.

4
Installing Pip

In this lecture, I show you how to install pip which a tool for installing and managing python packages.

5
Installing Selenium

In this video, I show you how to install Selenium Webdriver Python Bindings through Pip.

6
Installing Java

In this video, I am installing the JDK On windows.

7
Installing ChromeDriver

In this video, I show you how to install ChromeDriver standalone server which is needed to run tests on the chrome browser.

8
Installing IEDriver

In this video, I show you how to install the IEDriver server that matches your Windows system type (32 or 64-bit). We are going to use IEDriver to run tests on the Internet Explorer browser. In this tutorial, I am using Internet Explorer 9 running on Windows 7 Professional 32-bit.

9
Configuring Internet Explorer

In this video, I am configuring IE Protected Mode settings. This is required for certain IE versions.

Installation and Configuration on Ubuntu

1
Tools Overview (Instructions attached)

In this video, I give a brief description of the tools that we are going to install.

2
Upgrading Firefox and Installing Add-Ons

In this video, I show you how to upgrade Firefox and install Firebug, FirePath and Selenium IDE.

3
Installing Chrome

In this video, I show you how to install Chrome using the terminal.

4
Installing ChromeDriver

In this video, I show you how to install the ChromeDriver standalone server which is needed to run tests on the Chrome browser.

5
Installing Java

In this video, I show you how to install Java SDK using the terminal.

6
Installing Pip

In this lecture, I show you how to install pip which a tool for installing and managing python packages.

7
Installing Selenium

In this video, I show you how to install the selenium python bindings using Pip

8
Overwriting The PYTHONPATH

In this video, I show you how to overwrite the PYTHONPATH on Ubuntu. This is needed as later on we will use relative imports.

9
Installing Sublime Text Editor

In this video, I show you how to install the Sublime Text 2 Editor from the terminal. This is the IDE that we will use to write our selenium tests.

Overview of Selenium IDE

1
Selenium IDE Features Overview

In this video, I give you an overview of the Selenium IDE features. Selenium IDE is a tool to record and playback tests. In this lecture, I also show you how to record and playback your tests using this selenium tool.

2
Assert Vs Verify

In this video, I explain the difference between an Assert and a Verify command. Understanding these checks is really important since these are two commands that you will have to use when testing web applications with selenium.

3
Creating a Test Suite

In this video, I show you how to create a test suite in Selenium IDE.

4
Limitations

In this video, I discuss some of the limitations of Selenium IDE. Selenium Webdriver is the tool you should use if you want to develop robust tests.

Creating My First Selenium Test

1
Creating and Running My First Test

In this video, I show you how to navigate to a web page using Firefox, Chrome or IE drivers.

2
Implicit wait Vs. Explicit wait

One can use either Implicit wait or explicit wait to wait for web elements. In this video, I explain the difference between the two.

Locating Web Elements

1
Introduction

In this video, I give a quick description of Xpath and Css Selector.

2
Locating Elements Using XPATH (Cheat sheet attached)

In this video, I am showing you how to locate elements using Xpath. You need to have Firebug and FirePath plugins installed. You will also find attached a Cheat Sheet (PDF) of some basic Xpath locators.

3
Locating Elements Using CSS Selector (Cheat sheet attached)

In this video, I am showing you how to locate elements using CSS Selector. You need to have Firebug and FirePath plugins installed. You will also find attached a Cheat Sheet (PDF) of some basic CSS locators.

4
Dealing with Dynamic Elements

Dynamic elements can be really challenging to locate. In this video, I give you some tips on how to properly locate them.

5
Comparing Locator Strategies

In this video, I compare locator strategies (Xpath and Css Selector). Does Css always perform better than Xpath? Find out in the video.

6
Exercise

Now show me what you got :-).
In case, you have a hard time seeing the links in the excercise:

http://travelingtony.weebly.com/contact.html

http://travelingtony.weebly.com/store/p1/Leatherback_Turtle_Picture.html

Overview of Python Unittest Module

1
Understanding the "Unittest" module

In this video, I am giving an overview of the Python "unittest" module which is the equivalent of Java "Junit". This lecture is really important as we will use unittest to write our selenium tests.

2
Structure of a Test Case

In this video, I explain how a basic test case is structured: setUp(), the test and tearDown(). I also run a test case and show you what the report looks like.

3
Assert Methods

In this video, I provide a list of some of the assert methods. I also show you how to use them in your test cases.

4
Creating My First Test Suite

In this video, I show you how to create a test suite.

Webdriver API: Finding Element(s) and Applying Basic Actions

1
Methods to Find Element(s)

In this video, I show you how to find element(s) using the Webdriver Python API. There are several methods to find either an element or a group of elements. Understanding this is really important when learning Selenium Webdriver since selenium applies actions (click, send keys etc) on web elements.

2
Comparing Methods of Finding Element(s)

What method should you use to find an element or elements? This is what I am discussing in this video.

3
Clicking an Element or Sending Keys to an Element

Time to apply actions on elements using selenium webdriver API. In this video, I show you how to click on an element and how to send keys to an element.

4
Selecting an Option from a Drop-down

Selecting an option from a drop-down is one of the common actions when using selenium webdriver. In this video, I show you how to do it using two methods.

5
Getting an Element Text or Attribute

In this video, I show you how to get a web element text or attribute.

6
Exercise

Now it is your time to shine :-).

Webdriver API: Switching Focus to a Window, an Alert or a Frame

1
Switching Focus to a Window

In this video, I show you how to interact with elements inside a web page that opens as a separate window. Selenium webdriver provides a method to switch focus to such a window. Find more in the video :-)

2
Switching Focus to an Alert

How to switch to an alert? How to accept or dismiss an alert? I answer these questions in this video.

3
Switching Focus to a Frame

In this video, I show you how to switch focus to a frame. Selenium Webdriver won't interact with any elements inside a frame unless the focus is switch to that frame. Watch the video to see how this is done.

4
Exercise

Your time to shine :-).

Webdriver API: ActionChains

1
ActionChains Overview

There is a way to store actions (hover over, clicks, send keys, ) in a queue and execute them in the order they are queued up. You can achieve that using ActionChains. In this video, I give you a quick overview of ActionChains.

2
Moving Focus to an Element and Clicking a Submenu

In this lecture, I show you how to hover over a menu and click a submenu. This can be achieved using ActionChains. Find out by watching this video.

3
Sending Keys to an Element

In this lecture, I show you how to send keys to a web element using ActionChains. You can send keys to a field, a button etc.

4
Exercise

Your time to shine :-)

Organizing and Refactoring Your Code

1
Organizing and Refactoring Your Code

In this lecture, I show you how to organize your selenium tests code into packages and how to wrap your selenium calls in order to avoid code duplication. I also show you how to deal with tests that require logging into a website.

2
Exercise

Your time to shine :-). Once you complete this exercise, you will be able to write solid selenium automated tests on your own.

Design Patterns: Page Objects

1
Explaining Page Objects

Your selenium automated tests code should be maintainable. You can achieve that by using Page Objects. In this video, I am explaining the Page Objects concept.

2
Implementing Page Objects in your Tests

In this video, I show you to add Page Objects in your tests code.

3
Tracking Navigation

Watch this video to learn how to test your website navigation using Page Objects.

4
Exercise

Your time to shine :-).

Using a UI Map in your Tests

1
How to implement a UI Map

Keeping your locators in one central location is really important. It makes it easy to maintain your code. In this video, I show you how to put your locators in one place using a UI Map and I also show you how to make them human-readable.

2
Exercise

Your time to shine :-).

Testing Made Easy: Nose

1
Overview and Installation

Nose extends unittest to make it easy for you to manage python tests. With nose, you no longer need to create test suite manually. Nose can collect all your tests and run them. Find out how nose can do this in this video...

2
Collecting Tests with Nose

In this video, I show you how to collect tests with nose and we also explore some of nose options.

3
Exercise

Your time to shine :-).

Selenium Grid: Distributing Selenium Tests

1
Quick Overview and Installation

In this video, I give a quick overview of the Selenium Grid tool. What is a hub? What is a node? How does the Selenium Grid work?

2
Launching The Hub

In this video, I show you how launch the hub which is the controller of the Selenium Grid. I show you how to launch it from the command-line and using a json file. Find out more in the video.

3
Registering The Nodes

In this lecture, I show you how to register a node. This is really important since before running tests on a node, the hub has to know the capabilities that are available on that particular node.

4
Running Selenium Tests Remotely

In this lecture, I show you how to run Selenium tests on a node. In order to achieve that, we need to send the desired capabilities to the hub which should then redirect the tests to the appropriate node. Watch the video to learn how to that using Selenium Webdriver and Python.

5
Selenium Grid Quizz

In this quizz, we will see how well you understand the Selenium Grid tool. You can always rewatch the lectures if you are unsure about what the correct response should be.

Best Practices for Writing Solid Selenium Tests

1
Write Independent Tests

One of the basic principles of automation testing in general is to keep your tests independent from each other. Sometimes this does not seem obvious. How do you write independent tests? This is what I am discussing in this video.

2
Wrap Selenium Calls

Selenium Calls (Click(), send_keys etc ) should be wrapped in order to avoid code duplication. This is what I am discussing in this video.

3
Hide Selenium Calls from your tests

Your tests source code should be understandable by anybody who has no selenium background. This is what I am discussing in this video.

4
Use Tags

Think about a web application that has thousand of tests. Running the entire test suite will take a long time. We can group these tests so that we only run the ones that we need. This is what I am discussing in this video.

5
Document your Tests

Documentation is really important. We should create a central location where we document our selenium tests. What should we document? Please watch this video to find out...

Conclusion

1
Conclusion
2
Important Links

Selenium Webdriver Python API link:

http://selenium.googlecode.com/git/docs/api/py/index.html

SeleniumHQ (documentation on selenium) link:

http://www.seleniumhq.org/

Selenium project official site on google.com:

https://code.google.com/p/selenium/

Python nose:

https://nose.readthedocs.org/en/latest/

music by audionautix.com

You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
3.6
3.6 out of 5
270 Ratings

Detailed Rating

Stars 5
115
Stars 4
85
Stars 3
44
Stars 2
14
Stars 1
12
557e0c1934718ff7c8315782c0af17e0
30-Day Money-Back Guarantee

Includes

3 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion