manpagez: man pages & more
man safaridriver(1)
Home | html | info | man

safaridriver(1)           BSD General Commands Manual          safaridriver(1)


NAME

     safaridriver -- Safari WebDriver REST API service


SYNOPSIS

     safaridriver -p port [-h | --help] [--enable]


DESCRIPTION

     The safaridriver utility is used to launch an HTTP server that implements
     the Selenium WebDriver REST API. When launched, safaridriver allows for
     automated testing of web content using the version of Safari that is
     installed with macOS.

     safaridriver supports several capabilities that can customize an automa-
     tion session's behavior for a particular testing purpose. Capabilities
     are provided as arguments when requesting a new session.  The capabili-
     ties supported by safaridriver are listed in the OPTIONS section below.
     Unless noted below, the values of requested capability keys are not read
     and are assumed to be true if present, and false otherwise.

     To use capabilities in your tests, please refer to the relevant 3rd-party
     documentation to learn how to request extra capabilities with the Web-
     Driver client library that you are using.


OPTIONS

   Command line options
     -p, --port <port>
              Specifies the port on which the HTTP server should listen for
              incoming connections. If the port is already in use or otherwise
              unavailable, safaridriver will exit immediately with a non-zero
              return code.

     -h, --help
              Prints a usage message and exits.

     --enable
              Applies configuration changes so that subsequent WebDriver ses-
              sions will run without further authentication. This includes
              turning on Safari's Develop menu and checking "Enable Remote Au-
              tomation" in the Develop menu. The user must authenticate via
              password for the changes to be applied.

              When this option is specified, safaridriver exits immediately
              without starting up the REST API service. If the changes were
              successful or already applied, safaridriver exits 0; otherwise,
              safaridriver exits >0 and prints an error message to stderr.

   Available capabilities
     automaticInspection
              This capability instructs Safari to preload the Web Inspector
              and JavaScript debugger in the background prior to returning a
              newly-created window. To pause the test's execution in
              JavaScript and bring up Web Inspector's Debugger tab, you can
              simply evaluate a debugger; statement in the test page.

     automaticProfiling
              This capability instructs Safari to preload the Web Inspector
              and start a Timeline recording in the background prior to
              returning a newly-created window. To view the recording, open
              the Web Inspector through Safari's Develop menu.


NOTES

     For security reasons, the HTTP server accepts connections from localhost
     only. The HTTP server can accept connections from multiple test clients.
     Currently, only one Safari may be automated at a time, so it is not rec-
     ommended to run multiple safaridriver instances at the same time.

     safaridriver is typically executed manually at the command line or auto-
     matically by a WebDriver client library. The Selenium project provides
     client libraries for most popular programming languages. More information
     is available on the Selenium project website:

           https://www.seleniumhq.org/


SEE ALSO

     A summary of which REST API endpoints safaridriver supports, as well as
     the Safari version in which each endpoint became available, can be found
     on the Apple Developer website:

           https://developer.apple.com/


DIAGNOSTICS

     The safaridriver utility exits 0 on success, and >0 if an error occurs.

     When a REST API command fails, safaridriver includes a detailed error
     message in the response. If you use a 3rd-party library on top of the
     REST API service, consult the library's documentation for how to access
     these error messages.


STANDARDS

     safaridriver implements the Selenium WebDriver JSON Wire Protocol as
     described by the Selenium WebDriver test suites and the protocol summary
     published here:

           https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol

Darwin                         October 29, 2017                         Darwin

Mac OS X 10.12.6 - Generated Sun Oct 29 09:41:17 CDT 2017
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.