Data Driven Testing Using Selenium -WebDriver in Python
In this post, I will explain and share the code regarding data driven testing using an external csv file and iterating the tests multiple times with different sets of data as below: #################################################################### from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import unittest, time, re class Browse(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(30) self.base_url = "http://careergrab.com/" filename = 'test.csv' line_number = 1 ...