def open_base_url(set_browser, set_base_url): base_url = set_base_url driver = set_browser browser.set_driver(driver) driver.maximize_window() config.timeout = 10 browser.open_url(base_url) yield driver driver.quit()
def setup(self, browser_config, jupyter_url, notebook, connect_url): """Navigate to the front page""" self.notebook = notebook # navigate to the notebook browser.open_url(jupyter_url + notebook) MainToolBar().rsconnect_dropdown.click() MainToolBar().rsconnect_publish.click()
def open_base_url(set_browser, set_base_url): base_url = set_base_url driver = set_browser browser.set_driver(driver) driver.maximize_window() config.timeout = 10 browser.open_url(base_url) HomepageLocators.schedule_an_appointment_icon.should(be.visible) yield driver driver.quit()
bmp_client.new_har(options={"captureHeaders": True, "captureContent": True}) bmp_client.new_page(ref="slow_internet") # update the browser settings capabilities = webdriver.DesiredCapabilities.FIREFOX.copy() capabilities["acceptInsecureCerts"] = True bmp_client.add_to_webdriver_capabilities(capabilities) # launch the web browser driver = webdriver.Remote("http://selenium-hub:4444/wd/hub", capabilities) # give up to 10 minutes for the page to load driver.set_page_load_timeout(600) browser.set_driver(driver) try: # navigate the web browser to the web application front page browser.open_url(url) except Exception as ex: print(ex) finally: # close the web browser browser.quit() # save the har with open(f'{int(time.time())}.har', 'w') as outfile: json.dump(bmp_client.har, outfile) # kill the bmp client bmp_client.close()
def open_base_url(): browser.open_url(base_url) yield driver.quit()
def setup(self, browser_config, jupyter_url, notebook, connect_url): self.notebook = notebook browser.open_url(jupyter_url + notebook) MainToolBar().rsconnect_dropdown.click() MainToolBar().rsconnect_publish.should(be.visible) MainToolBar().rsconnect_publish.click()
def check_if_current_url_is(url): if browser.driver().current_url == url: pass else: browser.open_url(url)
def open_url(self, url): """Open url""" browser.open_url(url)
def setup(self, url, browser_config): """Navigate to the front page """ # navigate to the front page browser.open_url(url)
def open_home_page(web_driver, app_web_host): browser.open_url(app_web_host) app.login_page.container.should(be.visible) app.login_page.header.en_lang.click()
def __init__(self): browser.open_url("https://rtings.com")
def open_base_url(self): browser.driver().delete_all_cookies() browser.open_url(base_url + 'rent-camper/')
def open_home_page(): browser.open_url(base_url)