Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nightwatch

Package Overview
Dependencies
Maintainers
1
Versions
355
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nightwatch - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

12

bin/runner.js

@@ -52,6 +52,11 @@ var fs = require('fs'), path = require('path');

if (argv.c === DEFAULTS.config["default"]) {
argv.c = path.join(__dirname, argv.c);
if (fs.existsSync('./settings.json')) {
argv.c = path.join(path.resolve('./'), argv.c);
} else {
argv.c = path.join(__dirname, argv.c);
}
}
process.chdir(process.cwd());
var settings = require(argv.c);

@@ -101,3 +106,4 @@ var runner = require(__dirname + '/../runner/run.js');

runner.run(testsource, test_settings, {
output_folder : output_folder
output_folder : output_folder,
selenium : (settings.selenium || null)
}, function() {

@@ -104,0 +110,0 @@ runner.stopSelenium();

@@ -9,3 +9,5 @@ {

"server_path" : "",
"log_path" : ""
"log_path" : "",
"host" : "127.0.0.1",
"port" : 4444
},

@@ -16,3 +18,4 @@

"launch_url" : "http://localhost",
"port" : 4444,
"selenium_host" : "127.0.0.1",
"selenium_port" : 4444,
"silent": true,

@@ -19,0 +22,0 @@ "firefox_profile": false,

@@ -9,2 +9,10 @@ /**

module.exports = {
setUp : function() {
},
tearDown : function() {
},
'Demo test Google' : function (client) {

@@ -11,0 +19,0 @@ client

@@ -35,6 +35,8 @@ var util = require("util"),

if (this.options.port) {
HttpRequest.setSeleniumPort(this.options.port);
if (this.options.selenium_port) {
HttpRequest.setSeleniumPort(this.options.selenium_port);
}
if (this.options.selenium_host) {
HttpRequest.setSeleniumHost(this.options.selenium_host);
}
this.desiredCapabilities = {

@@ -449,5 +451,5 @@ browserName: "firefox",

var instance = null;
exports.client = function(options, settings) {
return new Nightwatch(options, settings);
exports.client = function(options) {
return new Nightwatch(options);
}

@@ -124,3 +124,6 @@ var util = require("util"),

Settings.selenium_port = port;
}
};
HttpRequest.setSeleniumHost = function(host) {
Settings.selenium_host = host;
};

@@ -127,0 +130,0 @@ function parseResult(data) {

{
"name": "nightwatch",
"description": "A node.js bindings implementation for selenium 2.0/webdriver",
"version": "0.1.2",
"version": "0.1.3",
"author": {

@@ -6,0 +6,0 @@ "name": "Andrei Rusu",

@@ -81,3 +81,3 @@ var path = require('path'),

exports.startSelenium = function (settings, test_settings, callback) {
if (!settings.selenium.start_process) {
if (!settings.selenium || !settings.selenium.start_process) {
callback();

@@ -88,3 +88,4 @@ return;

util.print(Logger.colors.light_purple('Starting selenium server... '));
var selenium_port = settings.selenium.port || 4444;
var selenium_host = settings.selenium.host || "127.0.0.1";
var output = '', error_out = '';

@@ -94,3 +95,4 @@ var spawn = require('child_process').spawn;

'-jar', settings.selenium.server_path,
'-port', test_settings.port
'-port', selenium_port,
'-host', selenium_host
];

@@ -103,4 +105,4 @@

seleniumProcess = spawn('java', cliOpts);
seleniumProcess.host = '127.0.0.1'
seleniumProcess.port = test_settings.port;
seleniumProcess.host = selenium_host;
seleniumProcess.port = selenium_port;
seleniumProcess.stdout.on('data', function(data) {

@@ -107,0 +109,0 @@ var sentinal = 'Started org.openqa.jetty.jetty.Server';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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