Socket
Socket
Sign inDemoInstall

wd

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wd

WebDriver/Selenium 2 node.js client


Version published
Weekly downloads
73K
decreased by-10.21%
Maintainers
1
Weekly downloads
 
Created
Source

WD.js -- A super light weight WebDriver/Selenium 2 client for node.js

Update node to 4.latest

http://nodejs.org/#download

Install

npm install wd

Usage

): wd shell
> x = wd.remote() or wd.remote("ondemand.saucelabs.com", 80, "username", "apikey")
> x.init() or x.init({desired capabilities ovveride})
> x.url("http://www.url.com")
> x.exec("window.location.href", function(o) { console.log(o) })
> x.close();
> x.quit()

Writing a test!

var webdriver = require("wd")

//get a new intsance
var browser = webdriver.remote();

//instantiate the session
browser.init({browserName:"chrome"}, function() {
  //goto url
  browser.get("http://www.jelly.io", function() {
    //exec js
    browser.exec("window.location.href", function(o) {
      //print the js output
      console.log(o);
      //goto another url
      browser.get("http://www.seleniumhq.org", function() {
        //close the browser
        browser.close(function() {
          //kill the session
          browser.quit()
        })
      })
    })
  })
})

FAQs

Package last updated on 15 Aug 2011

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc