Selenium WebDriver with Python 3.x - From Novice to Ninja

Video description

Design a web automation framework with Python and Selenium and test web applications like a pro

About This Video

  • Become familiar with Selenium WebDriver and Python programming
  • Get ready to design a flawless automation framework to test web applications
  • Gain the skills and confidence to pass Selenium automation interview questions

In Detail

Are you looking to step into the automation industry with the latest technologies available in the market? Or are you interested in learning how Selenium WebDriver and Python programming are used in automation projects? Whatever your motivation is, this course will help you build a solid foundation in web automation frameworks with ease.

This course provides a complete coverage of the web automation framework using Selenium WebDriver and Python programming. You will learn the basic concepts of Python programming, such as variables, data types, control flow, object-oriented programming, exceptional handling, and functions. In addition to this, you will also learn how to install and run Selenium WebDriver on various browsers. You will then gradually progress to designing automation frameworks to test web applications.

By the end of this course, you will become familiar with Python and Selenium WebDriver and will have developed the skills to test real-world web applications on any browser.

Who this book is for

Whether you are a quality assurance professional or a manual tester, who is looking to enter the field of automation testing, this course is for you. No previous knowledge of automation or coding is required to get started with this course as all the topics are taught from scratch.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Introduction
    1. Introduction
    2. Why Selenium?
    3. Selenium WebDriver Architecture
    4. How to reach me anytime?
  2. Chapter 2 : Setup and Configuration
    1. Python Installation – Windows
    2. Configuration of Python – Windows
    3. Python Installation and Setup – Mac
    4. First Project Creation and PyCharm Installation
    5. Must Watch Lecture Before Moving Forward
    6. Package Management Using PIP
    7. Installing iPython
  3. Chapter 3 : Understanding Variables and Data Type
    1. Python Terminal Walkthrough
    2. Understanding Objects and References
    3. Variable Rules
    4. Numbers – Data Type and Math Operations
    5. Numbers – Exponentiation and Modulo
    6. Arithmetic Order of Precedence
    7. Boolean Data Type
    8. Working with Strings in Python
    9. String Methods - Part 1
    10. String Methods - Part 2
    11. String Slicing and Indexing
    12. Strings Formatting
  4. Chapter 4 : Advanced Data Types
    1. List and Accessing the Elements
    2. List Methods
    3. Working with a Dictionary
    4. Nested Dictionary
    5. Dictionary Methods
    6. Working with Tuple
  5. Chapter 5 : Comparison and Boolean Operators
    1. Working with Comparison
    2. Understanding Boolean Operators
    3. Boolean Operators - Order of Precedence
  6. Chapter 6 : Program Control Flow
    1. Conditional Logic - If Else Conditions
    2. While Loop Demo
    3. Break Continue and While/Else
    4. For Loop Demo
    5. Iterating Multiple Lists - Using the Zip Function
    6. Using Range Function in For Loop
  7. Chapter 7 : Functions/Methods - Working with Reusable Code
    1. Understanding Methods
    2. Working with Return Values
    3. Working with Positional/Optional Parameters
    4. Understanding Variable Scope
    5. More Built-in Functions
    6. Practice Exercise with Solution Homework
  8. Chapter 8 : Classes – Object-Oriented Programming
    1. Understanding Objects/Classes
    2. Create your own Object
    3. Create your own Methods
    4. Inheritance
    5. Method Overriding
    6. Practice Exercise with Solution Homework
  9. Chapter 9 : Exception Handling
    1. Exception Handling Demo
    2. Finally and Else Block
    3. Practice Exercise with Solution Homework
  10. Chapter 10 : Modules
    1. Built-in Modules
    2. Create your own Modules
  11. Chapter 11 : Working with Files
    1. How to Write Data to a File
    2. How to Read a File
    3. File Handling Using the "With" and "As" Keywords
  12. Chapter 12 : Inspecting Elements on Different Browsers - Add-ons
    1. Introduction
    2. Inspecting Elements Using Firefox DevTools
    3. Firefox Add-On - Try XPath
    4. Inspecting Elements Using Chrome DevTools
    5. Chrome Extension - Part 1
    6. Chrome Extension - Part 2
    7. Tricks to Generate XPath
    8. Best Inspect Element Tool
  13. Chapter 13 : Selenium WebDriver Setup and Installation
    1. Selenium WebDriver Installation
    2. Installing Selenium Plug-In to PyCharm
    3. Selenium 3.x Update
  14. Chapter 14 : Selenium WebDriver Running Tests on Various Browsers
    1. Running Tests on Firefox
    2. Running Tests on Google Chrome
    3. Requirements to Run Tests on Internet Explorer (IE)
    4. Running Tests on Internet Explorer (IE)
    5. Requirements to Run Tests on Safari
    6. Running Tests on Safari
    7. Setting Drivers in the System Path – Mac
    8. Setting Drivers in the System Path – Windows
    9. Interview Questions
  15. Chapter 15 : Selenium WebDriver - Finding Elements
    1. Understanding Elements and Document Object Model (DOM)
    2. Finding Element by ID and Name
    3. Understanding Dynamic IDs and Selenium Exception
    4. Finding Elements by XPath and Cascading Style Sheets (CSS) Selectors
    5. Finding Elements by Link Text
    6. Finding Elements by Class Name and Tag Name
    7. Understanding the "By" Class
    8. Finding a List of Elements
    9. Interview Questions
  16. Chapter 16 : Cascading Style Sheets (CSS) Selectors - Advanced Locators
    1. Using IDs with Cascading Style Sheets (CSS) Selectors to Find Elements
    2. Using Multiple Cascading Style Sheets (CSS) Classes to Find Elements
    3. Using Wildcards with Cascading Style Sheets (CSS) Selectors
    4. Finding Child Nodes Using Cascading Style Sheets (CSS) Selectors
  17. Chapter 17 : XPath - Advanced Locators
    1. Difference between Absolute and Relative XPath
    2. Building an Effective XPath
    3. Using Text to Build an Effective XPath
    4. Building XPath Using the Contains Keyword
    5. Building XPath Using the Starts-With Keyword
    6. Finding Parent and Sibling Nodes
    7. Practice Exercise with Solution + Interview Question
  18. Chapter 18 : Selenium WebDriver - Working with WebElements
    1. Browser Interactions Introduction
    2. Browser Interaction Practical Implementation
    3. Clicking and Typing on a WebElement
    4. Finding the State of a WebElement (Disabled and Enabled Elements)
    5. Working with Radio Buttons and Checkboxes
    6. Working with Elements List
    7. Understanding Drop-down Elements
    8. Working with a Drop-down Element - Practical Example
    9. Working with Hidden Elements
    10. Working with Hidden Elements - Practical Example
    11. Interview Questions
  19. Chapter 19 : Selenium WebDriver - Useful Methods and Properties
    1. Getting the Text on an Element
    2. Getting the Value of an Element Attribute
    3. Generic Method to Find Elements
    4. Checking Whether the Element is Present
    5. Building Dynamic XPath
    6. Interview Questions
  20. Chapter 20 : Selenium WebDriver - Wait Types
    1. Implicit Wait versus Explicit Wait
    2. Implicit Wait - Practical Example
    3. Explicit Wait - Practical Example
    4. Generic Method to Work with Explicit Wait
    5. Interview Questions
  21. Chapter 21 : Selenium WebDriver – Advanced Interactions
    1. Calendar Selection Introduction
    2. Calendar Selection - Practical Example
    3. Calendar Selection - Real Time Example
    4. AutoComplete - Working With Dynamic Dropdowns
    5. AutoComplete - Additional Examples
    6. Taking Screenshots
    7. Generic Method to Take Screenshots
    8. Executing JavaScript Commands
    9. Finding the Size of the Window
    10. Scrolling an Element into View
    11. Interview Questions
  22. Chapter 22 : Selenium WebDriver - Switch Window and iframes
    1. Switching Window Focus
    2. Switching Window Focus - Practical Example
    3. Working with iframes
    4. Switching iframe Focus - Practical Example
    5. Handling JavaScript Pop-up
  23. Chapter 23 : Selenium WebDriver - Working with Actions Class
    1. Mouse Hover Actions
    2. Dragging and Dropping an Element on a Web Page
    3. Working with Sliders Actions
  24. Chapter 24 : Logging Infrastructure
    1. Introduction to Logging Infrastructure
    2. Changing the Format of Logs
    3. Logger - Console Example
    4. Logger - Configuration File Example
    5. Writing a Generic Custom Logger Utility
  25. Chapter 25 : Unittest Infrastructure
    1. Unittest Introduction
    2. Writing your First Test Case
    3. Implementing Class Level Setup and TearDown Methods
    4. Asserting a Test Method
    5. How to Export PYTHONPATH
    6. How To Run Code From Terminal
    7. How to create a Test Suite
  26. Chapter 26 : Pytest - Advanced Testing Framework
    1. Pytest Installation and Writing your First Script
    2. Working with Pytest Fixtures
    3. Multiple Ways to Run Test Cases
    4. Conftest - Common Fixtures to Multiple Modules
    5. Maintaining Run Order of Tests
    6. Running Tests Based on Command Line Arguments
    7. Structure Tests in a Test Class
    8. Returning a Value from Fixtures
    9. Generating HTML Test Report
  27. Chapter 27 : Automation Framework - Part 1
    1. Automation Framework Introduction
    2. Understanding Framework Structure
    3. Where to Practice Framework?
    4. Test Scenario without Framework
    5. Converting Test Case to the Page Object Model (POM) Framework
    6. Refactoring Your Page Object Class - Part 1
    7. Building Your Custom Selenium Driver Class
    8. Refactoring Your Page Object Class - Part 2
  28. Chapter 28 : Automation Framework - Part 2
    1. Adding Logging to Automation Framework
    2. Verifying Test Case Result
    3. Completing Login Page Test Cases
    4. Creating Conftest to Implement Common Setup Methods
    5. Refactoring Conftest to Make the Framework More Readable
  29. Chapter 29 : Automation Framework - Part 3
    1. Asserting without Stopping Test Execution
    2. Asserting without Stopping Test Execution - Practical Example - Part – 1
    3. Asserting without Stopping Test Execution - Practical Example - Part – 2
    4. Implementing Screenshots in a Framework
    5. Taking Screenshots on Test Failure
    6. BasePage and Util Concept Introduction
    7. Inheriting the BasePage Class
  30. Chapter 30 : Automation Framework - Practice Exercise
    1. Custom Driver - Additional Methods before Exercise
    2. Practice Exercise Question
    3. Finding Element Locators - Solution - Part 1
    4. Creating Register Courses Page Class - Solution - Part 2
    5. Creating Register Courses Test Class - Solution Part 3
    6. Practice Exercise Solution Update - Part 1
    7. Practice Exercise Solution Update - Part 2
    8. Handling Dynamic iframes in the Automation Framework
  31. Chapter 31 : Data-Driven Testing
    1. Setup and Configuration
    2. Data-Driven Testing - Practical Implementation
    3. Utility to Read Comma-Separated Values (CSV) Data
    4. Multiple Datasets - Test Case Practical Example
  32. Chapter 32 : Running Complete Test Suite
    1. Managing Navigation in an Automation Framework
    2. Refactoring Login Tests
    3. Running a Test Suite
    4. Running Test Suite on Chrome
  33. Chapter 33 : Git and GitHub - Version Control System
    1. Git and GitHub Introduction
    2. Git Installation on Windows
    3. Git Installation on Mac
    4. Creating Local Git Repository - Staging and Commit
    5. File Check in - GitHub Remote Repository
    6. Advantages and Importance of Git Branches
    7. File Check in and Resolving Merge Conflicts - Real Time Example
    8. Course Code Files on GitHub
    9. GitHub Project Check-in and Clone
  34. Chapter 34 : Continuous Integration with Jenkins
    1. Jenkins Features and Advantages
    2. Jenkins Setup and Installation - Generic WAR File
    3. Jenkins Setup and Installation – Windows
    4. Jenkins Setup and Installation – Mac
    5. Securing Jenkins
    6. Jenkins Plug-ins Management
    7. Building a Remote Project Using Git and Jenkins
  35. Chapter 35 : Conclusion
    1. BONUS: What's Next? And Other Cool Free Stuff

Product information

  • Title: Selenium WebDriver with Python 3.x - From Novice to Ninja
  • Author(s): Let's Kode It
  • Release date: June 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789131550