utils.webdriver#

This Webdriver class acts as a context manager for the selenium webdriver.

Module Contents#

class utils.webdriver.CookieSettingDriver(cookie, cookie_jar, facebook_accept_cookies, *args, **kwargs)#

Bases: selenium.webdriver.Firefox

Controls the GeckoDriver and allows you to drive the browser.

facebook_accept_cookies: bool#
cookie: str#
cookie_jar: http.cookiejar.MozillaCookieJar#
get(url: str)#

Navigate the browser to the specified URL in the current window or tab.

The method does not return until the page is fully loaded (i.e. the onload event has fired).

Parameters:#

urlstr
  • The URL to be opened by the browser.

  • Must include the protocol (e.g., http://, https://).

Example:#

>>> driver = webdriver.Chrome()
>>> driver.get("https://example.com")
class utils.webdriver.Webdriver(width: int, height: int, timeout_seconds: int, facebook_accept_cookies: bool = False, http_proxy: str = '', print_options: dict = {}, auth: dict = {})#
width#
height#
timeout_seconds#
auth#
facebook_accept_cookies = False#
http_proxy = ''#
print_options#