Socket
Socket
Sign inDemoInstall

wd

Package Overview
Dependencies
Maintainers
0
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wd - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

test/test.chrome.js

5

lib/main.js

@@ -74,2 +74,5 @@ var http = require("http");

}
if (desired && desired.name) {
this.desiredCapabilities.name = desired.name;
}

@@ -80,3 +83,3 @@ var req = http.request(_this.options, function(res) {

_this.sessionID = locationArr[locationArr.length - 1];
if (cb) { cb() }
if (cb) { cb(_this.sessionID) }
});

@@ -83,0 +86,0 @@ });

4

package.json
{ "name" : "wd"
, "description" : "WebDriver/Selenium 2 node.js client"
, "tags" : ["web", "automation", "browser", "javascript"]
, "version" : "0.0.1"
, "version" : "0.0.2"
, "author" : "Adam Christian <adam.christian@gmail.com>"

@@ -16,2 +16,2 @@ , "repository" :

, "directories" : { "lib" : "./lib" }
}
}

@@ -7,3 +7,3 @@ # WD.js -- A super light weight WebDriver/Selenium 2 client for node.js

## Install - SOON
## Install

@@ -17,5 +17,3 @@ <pre>

<pre>
): cd lib
): node
> var wd = require("./main")
): wd shell
> x = wd.createWebDriver() or wd.createWebDriver("ondemand.saucelabs.com", 80, "username", "apikey")

@@ -28,1 +26,32 @@ > x.init() or x.init({desired capabilities ovveride})

</pre>
## Writing a test!
<pre>
var wd = require("wd")
//get a new intsance
var browser = wd.createWebDriver();
//instantiate the session
browser.init(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()
})
})
})
})
})
</pre>
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