Class SafariDriver

java.lang.Object
org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.safari.SafariDriver
All Implemented Interfaces:
HasFederatedCredentialManagement, HasCapabilities, HasDownloads, Interactive, JavascriptExecutor, PrintsPage, HasDebugger, HasPermissions, SearchContext, TakesScreenshot, HasVirtualAuthenticator, WebDriver

public class SafariDriver extends RemoteWebDriver implements HasPermissions, HasDebugger
A WebDriver implementation that controls Safari using a browser extension (consequently, only Safari 5.1+ is supported).

This driver can be configured using the SafariOptions class.

  • Constructor Details

  • Method Details

    • builder

      @Beta public static RemoteWebDriverBuilder builder()
    • setPermissions

      public void setPermissions(String permission, boolean value)
      Description copied from interface: HasPermissions
      Set permission on the browser. The only supported permission at this time is "getUserMedia".
      Specified by:
      setPermissions in interface HasPermissions
      Parameters:
      permission - the name of the item to set permission on.
      value - whether the permission has been granted.
    • getPermissions

      public Map<String,Boolean> getPermissions()
      Specified by:
      getPermissions in interface HasPermissions
      Returns:
      each permission and whether it is allowed or not.
    • attachDebugger

      public void attachDebugger()
      Description copied from interface: HasDebugger
      This opens Safari's Web Inspector If driver subsequently executes script of "debugger;" the execution will pause, no additional commands will be processed, and the code will time out.
      Specified by:
      attachDebugger in interface HasDebugger
    • setFileDetector

      public void setFileDetector(FileDetector detector)
      Description copied from class: RemoteWebDriver
      Set the file detector to be used when sending keyboard input. By default, this is set to a file detector that does nothing.
      Overrides:
      setFileDetector in class RemoteWebDriver
      Parameters:
      detector - The detector to use. Must not be null.
      See Also: