import datetime
import unittest
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
class EnvSetup(unittest.TestCase):
def setup(self):
#self.driver = webdriver.chrome(r"C:/Users/Administrator/Downloads/Python Download/chromedriver_win32/chromedriver.exe")
self.driver = webdriver.firefox(executable_path="C:/Users/Administrator/Downloads/Python Download/geckodriver-v0.20.0-win64/geckodriver.exe")
self.driver.maximize_window()
wait = WebDriverWait(self.driver, 10)
#self.driver.i
print("Browser Started at :" + str(datetime.datetime.now()))
print("Chrome has been setUP....")
print("************************************")
self.driver.close()
def test_checkBrowser(self):
driver = self.driver
driver.get("https://www.goibibo.com/")
def closeBrowser(self):
driver = self.driver
self.driver.save_screenshot('1.png')
print('Test Completed: Closing the browser...')
self.driver.close()
if __name__ ==' main ':
unittest.main