Selenium Python Automation Testing from Scratch and Frameworks

Video description

Python is a popular choice for implementing Artificial Intelligence and web security in any application. This made the Quality Assurance (QA) industry shift its focus to Python for implementing test automation to support AI projects. This course will help you perform testing with Python automation using Selenium WebDriver.

The course begins with the installation process of Python and Selenium. Next, you will cover the basics of Python and move on to grasp the important topics that will help you write flawless programs in Python. Moving ahead, you will run tests in different browsers with the help of the Selenium Python package. Next, you will run a unit test in Pytest testing framework and develop an end-to-end Selenium Python framework from scratch. Then, you will integrate the Selenium Python framework into the Jenkins Continuous Integration (CI) tool and read and write data from Excel to the Selenium Python framework.

Toward the end, you will get an overview of Git and learn the importance of GitHub and its uses. You will understand staging and commit in Git as well as learn to resolve merge conflicts with Git.

By the end of this course, you will be able to use Python and Selenium for performing automation testing of applications.

What You Will Learn

  • Become familiar with data types, variables, and program flow of Python
  • Build logic to automate Hyper Text Markup Language (HTML) web tables using Selenium Python
  • Handle auto-suggestive dynamic dropdowns using Selenium WebDriver
  • Handle advance user interactions, child windows, and frames with Selenium
  • Log and generate HTML reports in the Python framework
  • Implement data-driven mechanism by removing hard coding data from tests

Audience

If you are new to testing, or an experienced manual tester, who wants to use Selenium and Python for automation testing, then this course is for you. No prior Python programming or automation testing experience is required for getting started on this course.

About The Author

Rahul Shetty: Rahul Shetty is the founder and trainer at Rahul Shetty Academy. He is a passionate software tester and has 13 years of rich experience in the IT industry. He has completed more than 300 offline training batches. Rahul has extensive knowledge in web automation testing, mobile automation testing, and API automation testing. He has also worked with various CMM-level organizations and managed the set-up of QA processes for projects.

Table of contents

  1. Chapter 1 : Python Testing and its Importance
    1. Why Choose Selenium for Your Test Automation Needs?
  2. Chapter 2 : Complete Installation Guide for Python and Selenium Learning
    1. How to Install Python on Your Machine?
    2. Important Note for Mac Users
    3. What Is a Private Information Provider (PIP) Client and How to Download Python Packages?
    4. Install PyCharm Editor and Set Project Interpreter
  3. Chapter 3 : Getting Started with Python Basics
    1. Python 'Hello World' Program with Basics
    2. Data Types in Python
  4. Chapter 4 : Understanding Python Data Types and Variables
    1. List Data Types and Operations
    2. Tuple and Dictionary Data Types in Python
    3. How to Create Dictionaries at Runtime and Add Data to Them
  5. Chapter 5 : Program Flow Control in Python
    1. 'if-else' Condition in Python
    2. Loops in Python and the Importance of Code Indentation
    3. Programming Examples Using 'for' Loop
    4. Programming Examples Using 'while' Loop
    5. What Are Functions and How to Use Them
  6. Chapter 6 : Understanding Object-Oriented Principles of Python
    1. OOP Principles – Classes and Objects
    2. Constructor and Its Role in Object-Oriented Programming
    3. Inheritance Concepts with Examples
    4. Strings and Their Functions
  7. Chapter 7 : Reading and Writing Files in Python
    1. Reading Text Files in Python
    2. Importance of readline and readlines Methods in Python
    3. Writing Data Using Python
  8. Chapter 8 : Exception Handling Mechanism
    1. Raising Exceptions
    2. Try-Catch Mechanism
    3. Using 'finally' with Exceptions
  9. Chapter 9 : Selenium Python Package Setup with Different Browser Execution
    1. How to Invoke Chrome Browser and Load the Website to Automate
    2. Basic WebDriver Methods to Get Title, URL, and Close the Session
    3. Running Tests in Firefox and Internet Explorer
  10. Chapter 10 : Different Types of Locators in WebDriver API with Examples
    1. Inspecting HTML to Identify Attributes of an Element
    2. Introduction to Cascading Style Sheets (CSS) Selector and Name Locators with an Example
    3. Finding Elements with Xpath and CSS Using ChroPath Plugin
    4. Extracting Text from a Web Page with Validation Assertions
  11. Chapter 11 : Techniques to Automate Web Elements
    1. Web Applications to Practice Selenium Automation
    2. Identifying Static Dropdowns Using Select Class of Selenium
    3. Handling AutoSuggestive Dynamic Dropdowns Using Selenium Webdriver
    4. Get Attribute of Values to Validate Dynamic Texts on the Browser
    5. Handling CheckBox Dynamically Using Selenium Python Programming
    6. Understand radiobutton Automation Methods with Examples
    7. Handling Java / JavaScript Alert Popups Using Selenium
  12. Chapter 12 : Synchronization (Explicit and Implicit Waits) in Selenium Web Driver
    1. What Are Waits? And Practise WebPage Demo for Automation
    2. Developing End-to-End TestCase to Automate the E-Commerce GreenKart Application
    3. Implicit Wait in Selenium and Its Advantages
    4. Explicit Wait in Selenium and an Example to Demonstrate
  13. Chapter 13 : Deep Dive into Functional Automation Using Python
    1. Functional Automation Example on GreenKart Application - 1
    2. Functional Automation Example on GreenKart Application - 2
  14. Chapter 14 : Handling Advanced User Interactions and Child Windows, Frames
    1. Advanced Interactions with Browser Elements Using Action Class
    2. Techniques to Handle Child Windows/Tabs with Selenium
    3. What Are Frames and Techniques to Handle with Selenium
  15. Chapter 15 : Selenium Python – Miscellaneous Features
    1. What Is a JavaScript Executor? Where Do We Need It in Selenium?
    2. How to Sort the Web Tables Using Selenium Python -Logic Build
    3. What Are Chrome Options and the Importance of Them in Selenium
  16. Chapter 16 : End-to-End Practice Project with Complete Methods
    1. Selecting a Product from List of Products with Product Name Parameter
    2. Complete Checkout Logic with Product Selection Example
    3. Handling Auto-Suggestive Drop-Down to Select Location and Confirm Order
  17. Chapter 17 : Framework Design Plan
    1. Tips and Tricks on Framework
  18. Chapter 18 : Part I – Unit Testing Framework
    1. Pytest and Its Advantages
    2. Running Pytests from the Terminal with Different Command Flags
    3. Running Selected Pytests from a Set of Tests
    4. Grouping Tests with Pytest Marks to Run Selected Groups
    5. Fixtures and Their Importance in Pytest Framework
    6. Importance of Conftest File
    7. Introduction to Data-Driven Fixtures
    8. Parameterizing Tests with Multiple Datasets Using Fixtures
    9. Generating HTML Reports for Pytest Test Cases
  19. Chapter 19 : Part II – Logging and Generating HTML Reports in Python Framework
    1. Introduction to Logging in Python Tests
    2. Importance of File Handler in Logging Tests
    3. Building Reusable Utility for Logging
    4. Integrating Pytest Logs into HTML Reporting
  20. Chapter 20 : Part III – Developing End-to-End Selenium Python Framework from Scratch
    1. Must-Watch Lecture on How Selenium Updated Its Version
    2. Standards of Writing Selenium Tests in Framework
    3. Generalizing Browser Invocation Code
    4. Creating Setup Fixtures and Passing Class Objects to Test
    5. Passing Command-Line Options to Select a Browser at Runtime
    6. Page Object Design Pattern and Its Importance
    7. Implementing Page Objects Mechanism into Framework Tests
    8. Optimizing Page Objects
    9. Creating Custom Utilities
    10. Implementing Framework Standards
    11. Debugging and Developing Custom Utilities
    12. Implementing Data-Driven Mechanism
    13. Parameterizing the Tests with Multiple Datasets
    14. Implementing Logging into Framework Tests
    15. Generating HTML Reports with Logging Integration
  21. Chapter 21 : Part IV – Integrating Framework to Jenkins
    1. Introduction to Jenkins
    2. Integrating Selenium Python Framework into Jenkins
    3. Setting Up Jenkins Parameterized Job Variables for Browser Selection
    4. Creating Jenkins JUnit Results with Pytest Commands
  22. Chapter 22 : Part V – Reading and Writing Data from Excel to Selenium Python Framework
    1. Introduction to Excel Data-Driven Testing
    2. Reading and Writing Data from Excel to Python Tests
    3. Building a Utility to Retrieve Values
    4. Loading the Excel Data
    5. Integrating Excel Utility into Selenium Python Framework
  23. Chapter 23 : Important Tips for Your New Job
    1. Wrapping Up
  24. Chapter 24 : Understanding Version Control System GIT
    1. Introduction to GIT
    2. Importance of GitHub and Its Uses
    3. Creating Git Config and Repositories
    4. Understanding Staging and Commit in Git
    5. Add Remote Repository and Push the Committed Code
    6. End-to-End Working Example on Git Commands - 1
    7. End-to-End Working Example on Git Commands - 2
    8. Importance of Branching in GIT
    9. How to Resolve Merge Conflicts with GIT

Product information

  • Title: Selenium Python Automation Testing from Scratch and Frameworks
  • Author(s): Rahul Shetty
  • Release date: January 2021
  • Publisher(s): Packt Publishing
  • ISBN: 9781800567733