class selenium.webdriver.safari.webdriver.WebDriver(port=0, executable_path='/usr/bin/safaridriver', reuse_service=False, desired_capabilities={'browserName': 'safari', 'version': '', 'platform': 'MAC'}, quiet=False)[source]

Controls the SafariDriver and allows you to drive the browser.

Creates a new Safari driver instance and launches or finds a running safaridriver service.

Args :
  • port - The port on which the safaridriver service should listen for new connections. If zero, a free port will be found.
  • quiet - If True, the driver’s stdout and stderr is suppressed.
  • executable_path - Path to a custom safaridriver executable to be used. If absent, /usr/bin/safaridriver is used.
  • desired_capabilities: Dictionary object with desired capabilities (Can be used to provide various Safari switches).
  • reuse_service - If True, do not spawn a safaridriver instance; instead, connect to an already-running service that was launched externally.

Closes the browser and shuts down the SafariDriver executable that is started when starting the SafariDriver

set_permission(permission, value)[source]

This Page