Skip to content
This repository has been archived by the owner on Jan 26, 2018. It is now read-only.

sovanta/karma-safari-launcher

 
 

Repository files navigation

karma-safari-launcher

Launcher for Safari.

Added Pull Request currently

There were some important Pull Requests open for us (not from us) and for the meantime we concat them all in this repo for us:

Safari WebDriver Setup

How does this work? (https://webkit.org/blog/6900/webdriver-support-in-safari-10/)

  1. It launches /usr/bin/safaridriver on a specified port (defaults to 4444).
  2. It then "ping"s the safaridriver until it starts accepting incoming connections.
  3. Creates a new WebDriver session (e.g., opens Safari).
  4. Navigates to the Karma provided URL.

To use this you need to do following setup steps:

  • Enable Remote Automation in safari (in dev tools settings)
  • Authorize safaridriver: sudo /usr/bin/safaridriver --enable

Installation

The easiest way is to keep karma-safari-launcher as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-safari-launcher": "~0.1"
  }
}

You can simple do it by:

npm install karma-safari-launcher --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['Safari']
  });
};

You can pass list of browsers as a CLI argument too:

karma start --browsers Safari

For more information on Karma see the homepage.

About

A Karma plugin. Launcher for Safari.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.1%
  • CoffeeScript 21.9%