def browser_management(): browser.config.browser_name = config.settings.browser_name browser.config.timeout = config.settings.browser_config_timeout driver = _set_custom_driver(config.settings) if driver: browser.config.driver = driver yield if config.settings.browser_quit_after_each_test: browser.quit() else: browser.clear_local_storage()
def browser_management(): browser.config.browser_name = config.settings.browser_name driver = _maybe_driver_from_settings(config.settings) if driver: browser.config.driver = driver yield if config.settings.browser_quit: browser.quit() else: browser.clear_local_storage()
def browser_management(): browser.config.browser_name = \ os.getenv('browser.config.browser_name', 'chrome') browser.config.browser_name = config.options.browser_name from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager chrome_options = webdriver.ChromeOptions() chrome_options.headless = False driver = webdriver.Chrome( executable_path=ChromeDriverManager().install(), options=chrome_options ) browser.config.driver = driver yield if config.options.browser_quit_after_each_test: browser.quit() else: browser.clear_local_storage()
def clear_data_after_each_test(self): yield browser.clear_local_storage()
def open_fresh_app(): if browser.matching(have.url_containing('todomvc')): browser.clear_local_storage() open_app() else: open_app()
def clear_and_close_browser(): yield browser.clear_local_storage() App().close()
def clear_storage(): browser.config.timeout = 6 yield browser.clear_local_storage()
def clear_storage(): yield browser.clear_local_storage()