def setup_function():
    global selenium_browser
    selenium_browser = get_test_driver()
    selenium_browser.get(TODOMVC_URL)
    WebDriverWait(selenium_browser, 4).until(
        expected_conditions.visibility_of_element_located(
            (By.CSS_SELECTOR, "#new-todo")))

    browser.set_driver(get_test_driver())
    browser.open(TODOMVC_URL)
    browser.element("#new-todo").should(be.visible)
Пример #2
0
def get_driver_config(url_base):
    args = get_args()
    if args.runenv == 'remote':
        driver = get_remote_chrome(args.ipenv)
    elif os.environ.get("RUN_ENV") == 'mobile':
        driver = get_mobile_chorme(args.ipenv)
    else:
        driver = get_local_chrome()
    browser.set_driver(driver)
    browser.config.base_url = url_base
    browser.config.browser_name = 'chrome'
    browser.config.timeout = 7
    browser.config.reports_folder = './reports'
    pytest.globalDict['_browser'] = driver
    return browser
 def __init__(self):
     mode = HEADLESS_MODE
     set_base_url()
     browser.set_driver(get_configured_chrome(mode))
Пример #4
0
def setup_module():
    browser.set_driver(webdriver.Chrome(ChromeDriverManager().install()))
    browser.driver().set_window_size(300, 400)
Пример #5
0
def setup_module():
    browser.set_driver(get_test_driver())
Пример #6
0
def setup_function():
    config.timeout = 4
    browser.set_driver(webdriver.Chrome(ChromeDriverManager().install()))
    config.base_url = 'file://{}/../../resources/orderapp/'.format(
        os.path.abspath(os.path.dirname(__file__))
    )
Пример #7
0
def setup_module():
    browser.set_driver(webdriver.Chrome(ChromeDriverManager().install()))
    config.timeout = 4