Exemplo n.º 1
0
def oneTimesetUp(request, browser):
    print("Running Onetime Setup")
    wdf = WebDriverFactory(browser)
    driver = wdf.getDriverInstance()
    if request.cls is not None:
        request.cls.driver = driver
    yield driver
    # close the browser
    # driver.quit()
    print("Running tear down")
Exemplo n.º 2
0
def onetime_Setup(request, BrowserOption, OStype):
    print('Running onetimeSetup')
    wdf = WebDriverFactory(BrowserOption)
    driver = wdf.getDriverInstance()

    if request.cls is not None:
        request.cls.driver = driver

    yield driver
    driver.quit()

    print('Teardown onetimeSetup')
def oneTimeSetup(request, browser):
    print("Running Onetime Setup")
    wdf = WebDriverFactory(browser)
    driver = wdf.getDriverInstance()
    lp = LoginPage(driver)
    lp.loginViaSignup("*****@*****.**", "abcabc")
    if request.cls is not None:
        request.cls.driver = driver

    yield driver
    #close the browser
    driver.quit()
    print("Running tear down")