diff --git a/lib/runner/cli/cli.js b/lib/runner/cli/cli.js index b5519ce488..4c5f9bde55 100644 --- a/lib/runner/cli/cli.js +++ b/lib/runner/cli/cli.js @@ -469,7 +469,7 @@ class CliRunner { let promise = Promise.resolve(); if (this.test_settings.selenium && this.test_settings.selenium.start_process) { - const Server = this.test_settings.selenium.isAppium + const Server = this.test_settings.selenium.use_appium ? require('../../transport/selenium-webdriver/appium.js') : require('../../transport/selenium-webdriver/selenium.js'); diff --git a/lib/transport/factory.js b/lib/transport/factory.js index 5931779829..ab8e761393 100644 --- a/lib/transport/factory.js +++ b/lib/transport/factory.js @@ -49,7 +49,7 @@ module.exports = class TransportFactory { let {browserName} = settings.desiredCapabilities; // Better support for Appium, if the browserName has explicitly been set to null we can skip all further checks - if (settings.selenium && settings.selenium.isAppium && !browserName) { + if (settings.selenium && settings.selenium.use_appium && !browserName) { return browserName; } @@ -62,7 +62,7 @@ module.exports = class TransportFactory { // // put a warning here that if trying to connect to an Appium server, // just setting browserName=null will not work in the future. - settings.selenium.isAppium = true; + settings.selenium.use_appium = true; return browserName; } @@ -106,7 +106,7 @@ module.exports = class TransportFactory { } if (usingSeleniumServer) { - if (nightwatchInstance.settings.selenium.isAppium) { + if (nightwatchInstance.settings.selenium.use_appium) { const Appium = require('./selenium-webdriver/appium.js'); return new Appium(nightwatchInstance, browserName); diff --git a/lib/transport/selenium-webdriver/options.js b/lib/transport/selenium-webdriver/options.js index 04f54bdc2d..b75fbba02a 100644 --- a/lib/transport/selenium-webdriver/options.js +++ b/lib/transport/selenium-webdriver/options.js @@ -251,7 +251,7 @@ module.exports = class SeleniumCapabilities { if (this.shouldSetupWebdriver()) { try { if (this.usingSeleniumServer()) { - if (this.settings.selenium.isAppium) { + if (this.settings.selenium.use_appium) { this.settings.selenium.server_path = this.settings.webdriver.server_path = this.getAppiumPath(); return this; diff --git a/test/src/api/commands/element/testClick.js b/test/src/api/commands/element/testClick.js index 2a773ac7eb..1195f1417c 100644 --- a/test/src/api/commands/element/testClick.js +++ b/test/src/api/commands/element/testClick.js @@ -195,7 +195,7 @@ describe('.click()', function() { silent: false, selenium: { start_process: false, - isAppium: true, + use_appium: true, port: 10195, host: 'localhost' }, diff --git a/test/src/cli/testServiceCreationFromCli.js b/test/src/cli/testServiceCreationFromCli.js index 076ee26acc..1bf1a2d4e7 100644 --- a/test/src/cli/testServiceCreationFromCli.js +++ b/test/src/cli/testServiceCreationFromCli.js @@ -4,7 +4,7 @@ const assert = require('assert'); const origPath = require('path'); describe('Service creation from cli.js', function() { - this.timeout(5000); + this.timeout(10000); beforeEach(function() { mockery.enable({useCleanCache: true, warnOnUnregistered: false}); @@ -67,7 +67,7 @@ describe('Service creation from cli.js', function() { output_folder: false, selenium: { start_process: true, - isAppium: true + use_appium: true }, test_settings: { 'default': { @@ -131,7 +131,7 @@ describe('Service creation from cli.js', function() { output_folder: false, selenium: { start_process: true, - isAppium: true, + use_appium: true, server_path: 'appium' }, test_settings: { @@ -189,7 +189,7 @@ describe('Service creation from cli.js', function() { output_folder: false, selenium: { start_process: false, - isAppium: true, + use_appium: true, host: 'localhost' }, test_settings: { @@ -221,7 +221,7 @@ describe('Service creation from cli.js', function() { }); }); - it('test selenium server startup if isAppium not used', function() { + it('test selenium server startup if use_appium not used', function() { mockery.registerMock('./appium_config.json', { src_folders: ['test/sampletests/before-after'], output_folder: false, diff --git a/test/src/index/transport/testAppiumTransport.js b/test/src/index/transport/testAppiumTransport.js index 61ead858cc..070764336d 100644 --- a/test/src/index/transport/testAppiumTransport.js +++ b/test/src/index/transport/testAppiumTransport.js @@ -9,7 +9,7 @@ describe('AppiumTransport', function () { const client = NightwatchClient.client({ selenium: { start_process: false, - isAppium: true, + use_appium: true, host: 'remote.host', port: 443 }, @@ -39,7 +39,7 @@ describe('AppiumTransport', function () { const client = NightwatchClient.client({ selenium: { start_process: true, - isAppium: true + use_appium: true }, webdriver: { start_process: false diff --git a/test/src/index/transport/testMobileOptions.js b/test/src/index/transport/testMobileOptions.js index 5efb098027..f0d94783bd 100644 --- a/test/src/index/transport/testMobileOptions.js +++ b/test/src/index/transport/testMobileOptions.js @@ -71,7 +71,7 @@ describe('Test mobile options in Nightwatch/Appium client', function () { it('have isIOS() for native testing on iOS', function () { const client = Nightwatch.createClient({ selenium: { - isAppium: true + use_appium: true }, desiredCapabilities: { browserName: null, @@ -91,7 +91,7 @@ describe('Test mobile options in Nightwatch/Appium client', function () { it('have isAndroid() for native testing on Android', function () { const client = Nightwatch.createClient({ selenium: { - isAppium: true + use_appium: true }, desiredCapabilities: { browserName: '', @@ -110,7 +110,7 @@ describe('Test mobile options in Nightwatch/Appium client', function () { it('have isAndroid() for web testing on Android using Appium', function () { const client = Nightwatch.createClient({ selenium: { - isAppium: true + use_appium: true }, desiredCapabilities: { browserName: 'Chrome', diff --git a/test/src/service-builders/testAppiumServer.js b/test/src/service-builders/testAppiumServer.js index 41101e2469..1ac9ebff0f 100644 --- a/test/src/service-builders/testAppiumServer.js +++ b/test/src/service-builders/testAppiumServer.js @@ -243,7 +243,7 @@ describe('AppiumServer Transport Tests', function () { }, selenium: { port: 9999, - isAppium: true, + use_appium: true, start_process: true, // server_path is only set automatically when server is started from cli.js server_path: '/path/to/appium/main.js' @@ -286,7 +286,7 @@ describe('AppiumServer Transport Tests', function () { }, selenium: { start_process: true, - isAppium: true, + use_appium: true, server_path: 'appium', cli_args: [ '--allow-insecure=chromedriver_autodownload' @@ -323,7 +323,7 @@ describe('AppiumServer Transport Tests', function () { host: 'somewhere', port: '4725', start_process: false, - isAppium: true + use_appium: true } });