GithubHelp home page GithubHelp logo

isabella232 / wdio-firefox-profile-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webdriverio-boneyard/wdio-firefox-profile-service

0.0 0.0 0.0 99 KB

WebdriverIO v4 service to easy define Firefox profiles for the WDIO testrunner

Home Page: http://webdriver.io

License: MIT License

JavaScript 99.99% CSS 0.01%

wdio-firefox-profile-service's Introduction

WDIO Firefox Profile Service

Code Climate Build Status dependencies Status


You want to run your Firefox browser with a specific extension or need to set couple preferences? Selenium allows you to use a profile for the Firefox browser by passing this profile as base64 string to the firefox_profile property in your desired capabilities. This requires to build that profile and convert it into base64. This service for the wdio testrunner takes the work of compiling the profile out of your hand and let's you define your desired options comfortable from the wdio.conf.js file.

To find all possible options just open about:config in your Firefox browser or go to mozillaZine website to find the whole documentation about each setting. In Addition to that you can define compiled (as *.xpi) Firefox extensions that should get installed before the test starts.

Installation

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

{
  "devDependencies": {
    "wdio-firefox-profile-service": "~0.0.2"
  }
}

You can simple do it by:

npm install wdio-firefox-profile-service --save-dev

Instructions on how to install WebdriverIO can be found here.

Configuration

Setup your profile by adding the firefox-profile service to your service list. Then define your settings in the firefoxProfile property like this:

// wdio.conf.js
export.config = {
  // ...
  services: ['firefox-profile'],
  firefoxProfile: {
    extensions: [
      '/path/to/extensionA.xpi', // path to .xpi file
      '/path/to/extensionB' // or path to unpacked Firefox extension
    ],
    'browser.startup.homepage': 'http://webdriver.io'
  },
  // ...
};

Options

firefoxProfile

Contains all settings as key value pair. If you want to add an extension, use the extensions key with an array of string paths to the extensions you want to use.

Type: Object

Development

All commands can be found in the package.json. The most important are:

Watch changes:

$ npm run watch

Run tests:

$ npm test

# run test with coverage report:
$ npm run test:cover

Build package:

$ npm build

For more information on WebdriverIO see the homepage.

wdio-firefox-profile-service's People

Contributors

andriilazebnyi avatar christian-bromann avatar dombre avatar tallyb 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.