Python is also a widely used language for building Selenium WebDriver tests. It offers various ways to parameterize tests.
In this recipe, we will parameterize a Selenium WebDriver test written in Python, using a CSV file.
Let's create a simple Python test for parameterization, using the following steps. This test will read test data from the CSV file used in the Reading test data from a CSV file using JUnit recipe earlier.
from selenium import webdriver import csv, sys
#Variables for Printing Test Summary test_executed = 0 test_passed ...