Socket
Book a DemoInstallSign in
Socket

phantom-wd

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phantom-wd

A webdriver wrapper around PhantomJS

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
65
-61.99%
Maintainers
2
Weekly downloads
 
Created
Source

phantom-wd

A webdriver (using wd) wrapper around PhantomJS.

PhantomJS must be installed and available on the PATH for this package to work.

Usage

var phantom = require("phantom-wd");

var browserPromise = phantom({
    debug: false       // boolean, console.log PhantomJS output
    port:  8910        // number, which port PhantomJS should listen on
});

browserPromise is a promise for wd.promiseRemote.

phantom()
.then(function (browser) {
    return browser.get("http://admc.io/wd/test-pages/guinea-pig.html")
    .then(function () {
        return browser.execute("return document.title");
    })
    .then(function (title) {
        expect(title).toEqual("WD Tests");

        // This both shuts down the webdriver connection and kills PhantomJS
        return browser.quit();
    });
})
.done();

License

BSD 2-Clause

Keywords

webdriver

FAQs

Package last updated on 09 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts