This video explains how to Organizing Python Selenium Script using Class and Function.
♥️ Subscribe Few Steps:
/ @fewsteps
Code from this tutorial:
----------------------------------------
from selenium import webdriver
import time
baseUrl = 'http://www.google.com'
locationChromeDriver = '../drivers/chromedriver'
class RunTestClass:
def testMethod(self):
drive = webdriver.Chrome(executable_path=locationChromeDriver)
drive.get(baseUrl)
time.sleep(10)
obj = RunTestClass()
obj.testMethod()
#selenium #python #fewsteps