Exemple #1
0
def one_time_setup(browser, request):
    # print("Running one time setUp")
    wdf = WebDriverFactory(browser)
    driver = wdf.get_webdriver_instance()
    lp = LoginPage(driver)
    lp.login("*****@*****.**", "abcabc")

    if request.cls is not None:
        request.cls.driver = driver
    yield driver
    driver.quit()
Exemple #2
0
def one_time_setup(request, browser, headless):
    """
    Setting up options to webdriver
    :param request: service attribute
    :param browser: from pytest_addoption
    :param headless: from pytest_addoption
    :return: webdriver instance
    """
    wdf = WebDriverFactory(browser, headless)
    driver = wdf.get_webdriver_instance()
    if request.cls is not None:
        request.cls.driver = driver
    yield driver
    driver.quit()