This is a basic example of a Selenium testcase using the python Unittest library
from selenium import webdriver
import unittest
class SeleniumTest(Unittest.testcase):
def setUp(self):
self.driver = webdriver.Chrome()
self.driver.implicitly_wait(30)
def test(self):
self.driver.get("https//www.google.com")
self.driver.find_element_by_id("lst-ib").send_keys("python")
self.driver.find_element_by_css_selector("span[class=\"sbico\"]").click()
def tearDown(self):
self.driver.quit()