def oneTimeSetUp(request, browser): print("Running one time setUp") wdf = WebDriverFactory(browser) driver = wdf.getWebDriverInstance() if request.cls is not None: request.cls.driver = driver yield driver driver.quit() print("Running one time tearDown")
def oneTimeSetUpNoLogin(request, browser): #print("Running one time setUp") wdf = WebDriverFactory(browser) driver = wdf.getWebDriverInstance() #lp = LoginPage(driver) #lp.login("*****@*****.**", "1234576") if request.cls is not None: request.cls.driver = driver yield driver driver.quit()
def oneTimeSetUp(request, browser): print("Running one time setUp") wdf = WebDriverFactory(browser) driver = wdf.getWebDriverInstance() # lp = LoginPage(driver) # lp.loginAndRedirect("*****@*****.**", "Bentlyboy1") # only for login on certain sites Ex. Undefeated.com if request.cls is not None: request.cls.driver = driver yield driver driver.quit() print("Running one time tearDown")
def oneTimeSetUp(request, browser): print("Running one time setUp") wdf = WebDriverFactory(browser) driver = wdf.getWebDriverInstance() lp = LoginPage(driver) lp.login("*****@*****.**", "abcabc") if request.cls is not None: request.cls.driver = driver yield driver # driver.quit() print("Running one time tearDown")
def oneTimeSetUp(request, browser, osType): print("\n Running one time setUp") wdf = WebDriverFactory(browser) driver = wdf.getWebDriverInstance() lp = LoginPage(driver) lp.login("*****@*****.**", "abcabc") if request.cls is not None: request.cls.driver = driver yield driver time.sleep(2) #driver.quit() print("\n Running one time tearDown") driver.close()