Coder Social home page Coder Social logo

professoreugene / karma-webdriverio-launcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tatablack/karma-webdriverjs-launcher

1.0 2.0 0.0 96 KB

A plugin for Karma. Launcher for Remote WebDriver instances using WebDriverJS.

License: MIT License

JavaScript 100.00%

karma-webdriverio-launcher's Introduction

karma-webdriverio-launcher [forked from tatablack/karma-webdriverjs-launcher]

A plugin for Karma. Launcher for Remote WebDriver instances using WebDriverIO.

Why another WebDriver launcher?

This implementation is inspired by the karma-webdriver-launcher made by the folks at Karma.

However, it uses a different WebDriver implementation (WebdriverIO instead of wd), and tries harder to get hold of a browser instance from Selenium Grid.

Installation

Not published on the NPM registry yet. For the time being, you'll need to add it to your devDependencies with its Github url, like this:

  "devDependencies": {
    "karma-webdriverio-launcher": "git://github.com/ProfessorEugene/karma-webdriverjs-launcher.git#0.1.1"
  }

Usage

Add a custom launcher to your Karma configuration, specifying the necessary parameters.

customLaunchers: {
    'Remote-IE9': {
        base: 'WebdriverIO',
        config: {
            host: 'qa-builder001',
            desiredCapabilities: {
                browserName: 'internet explorer',
                version: '9'
            }
        }
    }
}

And then use that launcher in your browser suite configuration.

Options

config.host

The hostname of your Selenium Grid server, or Saucelabs instance.

config.port

Unsurprisingly, the port where your Selenium Grid server is running, or your Saucelabs instance is connected to.

config.desiredCapabilities

Nothing specific here. Just have a look at Selenium documentation, and possibly WebdriverIO README. A sample configuration might thus be:

config: {
    desiredCapabilities: {                 // Sample configuration.
        browserName: 'internet explorer',  //
        platform: 'XP',                    // Check the documentation links above
        version: '9'                       // for additional capabilities.
    }                                      //
}

config.ieDocumentMode

You might want to trigger (or avoid triggering) a specific compatibility mode for IE (see MSDN for an explanation). This will actually just append a parameter to the URL being loaded through Selenium, Karma itself takes care of adding the proper META tag.

config: {
    desiredCapabilities: {
        // desired capabilities here
    },

    ieDocumentMode: 'IE=edge' // <--
}

config.loglevel

WebdriverIO can be pretty informative, but you might want to skip some of its output. The loglevel parameter is passed directly to WebdriverIO, so have a look at its documentation to determine what's the best option for you.

config: {
    desiredCapabilities: {
        // desired capabilities here
    },
    
    logLevel: 'silent',  // <-- verbose | silent | command | data | result
}

karma-webdriverio-launcher's People

Contributors

tatablack avatar professoreugene avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.