Skip to content

Dsazz/plus.garden.webdriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plus.garden.webdriver NPM version Dependency Status

API Reference | CSS Selectors | Selenium installation guide

Webdriver for Garden.js

Installing/Configuring

Suppose, you already have a project with configured garden environment (more info here). Now you need to add plus.garden.webdriver as a dependency in your garden/package.json:

    "dependencies": {
        /* ... */
        "plus.garden.webdriver": "~0.0.1",
        /* ... */
      }

And run npm install

    npm install

Or just add and install the dependency automatically via npm:

    $ cd garden
    $ npm install --save plus.garden.webdriver

Now register the installed module in garden/container.js:

    module.exports = function (container) {
        //...
        container.register('Webdriver', require('plus.garden.webdriver'));
        //...
    }

And add the registered module to garden's "world"

    // garden/DIR_WITH_YOUR_TESTS/support/world.js

    var World = function World(callback) {
        garden.get('Webdriver.Browser').create(function (browserService) {
            this.browserService = browserService;
            this.driver = browserService.driver;
            this.browser = browserService.browser;
        }.bind(this));
    }
    
    defineSupportCode(function({setWorldConstructor}) {
        /* ... */
        setWorldConstructor(World);
        /* ... */
    });

That's it. Your garden is ready to use the webdriver module.

You also can install this package with Garden generator.

Dependencies

For using plus.garden.webdriver you should install and run Selenium server. You can install and manage it in any convenient way.

We provide a list of steps for installing Selenium, which we tested in our package. See here.

About

Webdriver for Garden.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages