npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wdio-safaridriver-service

v2.1.1

Published

WebdriverIO service to start & stop Safaridriver

Downloads

50,908

Readme

WDIO SafariDriver Service CI

This service helps you to run the Safari browser seamlessly when running tests with the WDIO testrunner. It uses the /usr/bin/safaridriver that comes with Safari/OSX.

Note - this service does not require a Selenium server, but uses the /usr/bin/safaridriver to communicate with the browser directly. Obvisously, it only supports:

capabilities: [{
    browserName: 'safari'
}]

Installation

The easiest way is to keep wdio-safaridriver-service as a devDependency in your package.json.

{
  "devDependencies": {
    "wdio-safaridriver-service": "^1.0.0"
  }
}

You can simple do it by:

npm install wdio-safaridriver-service --save-dev

Instructions on how to install WebdriverIO can be found here.

Configure Safari to Enable WebDriver Support

Safari’s WebDriver support for developers is turned off by default. How you enable it depends on your operating system.

High Sierra and later

Run safaridriver --enable once. (If you’re upgrading from a previous macOS release, you may need to use sudo.)

Sierra and earlier

  1. If you haven’t already done so, make the Develop menu available. Choose Safari > Preferences, and on the Advanced tab, select “Show Develop menu in menu bar.” For details, see Safari Help.

  2. Choose Develop > Allow Remote Automation.

  3. Authorize safaridriver to launch the XPC service that hosts the local web server. To permit this, manually run /usr/bin/safaridriver once and follow the authentication prompt.

Configuration

By design, only Safari is available, and will only work on Mac OS. In order to use the service you need to add safaridriver to your service array:

// wdio.conf.js
export.config = {
    // port to find safaridriver
    port: 4447, // if you want to specify the port. Default is 4444
    path: '/',
    // ...
    capabilities: [{
    /*
     * safaridriver can only handle 1 instance unfortunately
     * https://developer.apple.com/documentation/webkit/about_webdriver_for_safari
     */
    maxInstances: 1,
    }],
    services: [
        ['safaridriver', {
            outputDir: './logs',
            logFileName: 'wdio-safaridriver.log'
        }]
    ],
    // ...
};

Options

port

The port on which the driver should run on.

Example: 4444 Type: number

args

Array of arguments to pass to the safaridriver executable. -p will use wdioConfig.port if not specified.

Type: string[]

outputDir

The path where the output of the Safaridriver server should be stored (uses the config.outputDir by default when not set).

Type: string

logFileName

The name of the log file to be written in outputDir.

Type: string


For more information on WebdriverIO see the homepage.