karma-selenium-webdriver-launcher

0.0.4 • Public • Published

karma-selenium-webdriver-launcher

Use a custom Selenium Webdriver instance. Useful for iron fist control, ex: extension testing.

Installation

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

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

You can also add it by this command:

npm install karma-selenium-webdriver-launcher --save-dev

Configuration

// karma.conf.js
var By = require('selenium-webdriver').By,
    until = require('selenium-webdriver').until,
    firefox = require('selenium-webdriver/firefox');
 
module.exports = function(config) {
  config.set({
    frameworks: ['jasmine'],
 
    // define browsers
    customLaunchers: {
      swd_firefox: {
        base: 'SeleniumWebdriver',
        browserName: 'Firefox',
        getDriver: function(){
          // example from https://www.npmjs.com/package/selenium-webdriver#usage
          var driver = new firefox.Driver();
          return driver;
        }
      },
    },
 
    browsers: ['swd_firefox']
  });
};

Browser options

  • browserName name of the browser (ideally we'll use Capabilities in the future)
  • getDriver function that will return a webdriver instance to the karma test runner (not the test being run)

Additional Test API

TODO (see #3)


For more information on Karma see the homepage.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    4,408
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    4,408
  • 0.0.3
    43
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i karma-selenium-webdriver-launcher

Weekly Downloads

4,451

Version

0.0.4

License

MIT

Last publish

Collaborators

  • pixnbits
  • dos1