Category: Python Automation

How To use fixture in Pytest Framework

Table of Contents What is a fixture in PyTest framework? How to use conftest file in PyTest How to use generic fixtures in Pytest How to use scope in fixtures in Pytest How to use data driven fixtures in PyTest How to use multiple data sets for parameterization in fixtures in Pytest Conclusion What is […]

How to generate HTML reports in PyTest Framework

Installing the PyTest HTML plugin To generate HTML reports with the Pytest framework we have to install a plugin. For the installation, we shall execute the command pip install pytest-html. Next to generate the report we shall run the command pytest –html=report.html. The output shows four test cases got passed, one test case skipped, one […]

How to Create a Robust Automation framework in Python using PyTest

table of contents What is Pytest Testing Framework? To run Pytest file from PyCharm editor To run Pytest file from command line To run selected test files using Pytest To group tests and run selected groups using Pytest What is Pytest Testing Framework? The Pytest testing framework is used to create a robust automation framework […]

How to Read/ Write data from Excel for Selenium DataDriven tests in Python

Introduction to Excel Data Driven Testing To interact with excel in Python is a straightforward process. We have to use the openpyxl library in Python which helps to read/write in excel. This package is not available by default in the installed Python packages. We have to download by running the command pip install openpyxl from […]

How to do Logging in Selenium Tests using Python Logging Framework

We shall discuss how to introduce logging to our tests and how logging is important. After execution of test cases if we want to know the failures and how the test execution has taken place, we look at the test reports. However, if we want to investigate why the failures have taken place we should […]

End to End Practice Project with Complete methods in Selenium Python

We shall now discuss one functional automation scenario in the application with the link: https://rahulshettyacademy.com/angularpractice/shop Selecting a Product from the list of Products with Product Name parameter Let us obtain all the list of product names along with their prices. Let us spy on one of the products and analyze the html code. Each of […]

JavaScript Executor and Chrome Options in Selenium Python

Table of Contents Javascript Executor and Why do we need them Code Implementation Examples of JavaScript Executor for various Web Operations Code Implementation Code Implementation Conclusion Chrome Options and importance in Selenium Code Implementation Conclusion Within the Selenium Python miscellaneous topics we shall be covering Javascript executor and some of the examples on Javascript Executor. […]

Handling Advanced User Interactions, Child windows, Frames in Selenium Python

table of contents Techniques to handle Child Windows/Tabs Code Implementation: Code Implementation: Frames and techniques to handle them Code Implementation: Code Implementation: Advanced interactions with Browser elements with Actions class Code Implementation: Code Implementation: Double click and Context click with Actions class Code Implementation: Code Implementation: Conclusion:  Techniques to handle Child Windows/Tabs Selenium handles opening […]

How to Build Logic to Automate HTML Web Tables in Selenium Python

Let us test a scenario where we shall validate if the sum of the values under the Total column in the order summary table is equal to the value of Total Amount field. We shall be using the GreenKart application with the below link: https://rahulshettyacademy.com/seleniumPractise/#/ Let us now spy on the table and analyze its […]

Deep Dive into Functional Automation using Python

Table of Contents When to use implicit wait and explicit wait in Tests Functional Automation Example 1 Code Implementation: Functional Automation Example 2 Code Implementation: When to use implicit wait and explicit wait in Tests There are a lot of debates on whether to use implicit and explicit wait in our test execution. If our […]