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")
Пример #2
0
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()
Пример #3
0
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")
Пример #5
0
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()
Пример #6
0
 def __init__(self, driver):
     super().__init__(driver)
     self.driver = driver
     self.wdf = WebDriverFactory(driver)