コード例 #1
0
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
ファイル: conftest.py プロジェクト: frankied003/DigiBot
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")
コード例 #4
0
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()