From 2ee9bfd6bd56648d06bc331d852b00e0f5505df3 Mon Sep 17 00:00:00 2001 From: i866899 Date: Tue, 11 Feb 2020 13:34:45 -0500 Subject: [PATCH 01/23] Rename the current Edge to EdgeLagacy in config and docs. Add new configuration and a new chapter for Edge (chromium). --- README.md | 2 +- conf/profile.conf.js | 6 ++-- docs/config/config.md | 2 +- docs/config/drivers.md | 17 +++++++++-- src/connection/directConnectionProvider.js | 33 +++++++++++++++++++++- src/runtimeResolver.js | 4 +-- 6 files changed, 54 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a8b77da6..6f401eb6 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ and brings most (and more) of its benefits to UI5 applications. * Does not depend on testability support in applications - works with autorefreshing views, resizing elements, animated transitions. * Declarative authentications - authentication flow over OAuth2 providers, etc. * Console operation, CI ready, fully configurable, no need for java (comming soon) or IDE. -* Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, Safari, iOS, Android. +* Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, EdgeLagacy Safari, iOS, Android. * Open-source, modify to suite your specific neeeds. ## Requirements diff --git a/conf/profile.conf.js b/conf/profile.conf.js index e0069e42..8b22a45f 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -83,7 +83,7 @@ exports.config = { } }, /* maximize browser on all desktops to ensure consistent browser size */ - 'firefox,ie,edge,safari,chrome,chromium': { + 'firefox,ie,edge,edgelagacy,safari,chrome,chromium': { 'windows,mac,linux': { '*': { remoteWebDriverOptions: { @@ -186,10 +186,10 @@ exports.config = { }, */ /* - 'edge': { + 'edgelagacy': { '*': { '*': { - edgedriverOptions: { + edgelagacydriverOptions: { 'setPageLoadStrategy': ['normal'], } } diff --git a/docs/config/config.md b/docs/config/config.md index eadf527d..8a275b28 100644 --- a/docs/config/config.md +++ b/docs/config/config.md @@ -38,7 +38,7 @@ Browser runtime is an object that specifies the browser and platform on which to You can specify only a few of the properties of a runtime. The rest are derived if possible or wildcards are assumed. Values and defaults: -* browserName - one of (chrome|firefox|ie|safari|edge), browser name, default: chrome +* browserName - one of (chrome|firefox|ie|safari|edge|edgelagacy), browser name, default: chrome * browserVersion - browser version, default: * * platformName - one of (windows|mac|linux|android|ios|winphone)} - platform name, default: windows * platformVersion - platform number like 7,8 for windows; 4.4,5.0 for android;, default: * diff --git a/docs/config/drivers.md b/docs/config/drivers.md index b6269f6f..b290cd5a 100644 --- a/docs/config/drivers.md +++ b/docs/config/drivers.md @@ -125,6 +125,19 @@ browsers: [{ }] ``` +## Microsoft Edge (based on Chromium) +Microsoft Edge Driver is downloadable separately from Windows. Please make sure you have the correct version installed as explained in [Microsoft Edge](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/). The WebDriver release version should match browser version, for example, for Microsoft Edge (based on Chromium) Release 79, choose WebDriver Release 79. The downloaded driver should be moved to /selenium/ without renaming. +```javascript +browsers: [{ + browserName: 'edge', + capabilities: { + remoteWebDriverOptions: { + maximized: true + } + } +}] +``` + ## Firefox Firefox uses the geckodriver that is updated regularly, so by default, we use the latest version. @@ -169,8 +182,8 @@ browsers: [{ }] ``` -## Edge -Microsoft Edge requires a WebDriver that is distributed as a native installation. Please make sure you have the correct version installed as explained in [Microsoft Edge WebDriver](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/). The release version should match the first part of your OS build, for example, for OS build number 15063.0000, choose driver Release 15063. The downloaded driver should be moved to /selenium/ without renaming. +## Edge Legacy +Microsoft Edge Legacy requires a WebDriver that is distributed as a native installation. Please make sure you have the correct version installed as explained in [Microsoft Edge Legacy](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/). The release version should match the first part of your OS build, for example, for OS build number 15063.0000, choose driver Release 15063. The downloaded driver should be moved to /selenium/ without renaming. ## Safari Safari10 includes native webdriver that is bundled with the Safari browser. Please make sure you have enabled it as explained in [Testing with WebDriver in Safari](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari). diff --git a/src/connection/directConnectionProvider.js b/src/connection/directConnectionProvider.js index 7920dfa9..2fde2655 100644 --- a/src/connection/directConnectionProvider.js +++ b/src/connection/directConnectionProvider.js @@ -85,6 +85,8 @@ DirectConnectionProvider.prototype.resolveCapabilitiesFromRuntime = function(run capabilities.browserName = 'internet explorer'; } else if (runtime.browserName === 'edge') { capabilities.browserName = 'MicrosoftEdge'; + } else if (runtime.browserName === 'edgelagacy') { + capabilities.browserName = 'MicrosoftEdgeLagacy'; } else { capabilities.browserName = runtime.browserName; } @@ -197,11 +199,19 @@ DirectConnectionProvider.prototype.setupEnv = function() { } else if (browserName == 'edge') { promises.push((function() { var deferred = q.defer(); - var filename = path.join(that._getSeleniumRoot(), 'MicrosoftWebDriver.exe'); + var filename = path.join(that._getSeleniumRoot(), 'msedgedriver.exe'); that.seleniumConfig.executables.edgedriver = filename; deferred.resolve(filename); return deferred.promise; })()); + } else if (browserName == 'edgelagacy') { + promises.push((function() { + var deferred = q.defer(); + var filename = path.join(that._getSeleniumRoot(), 'MicrosoftWebDriver.exe'); + that.seleniumConfig.executables.edgelagacydriver = filename; + deferred.resolve(filename); + return deferred.promise; + })()); } else { that.logger.debug('No need to download webdriver binary for: ' + browserName); } @@ -469,6 +479,8 @@ DirectDriverProvider.prototype.getNewDriver = function() { opts.jvmArgs.push('-Dwebdriver.ie.driver=' + that.seleniumConfig.executables.iedriver); } else if (browserName == 'MicrosoftEdge') { opts.jvmArgs.push('-Dwebdriver.edge.driver=' + that.seleniumConfig.executables.edgedriver); + } else if (browserName == 'MicrosoftEdgeLagacy') { + opts.jvmArgs.push('-Dwebdriver.edgelagacy.driver=' + that.seleniumConfig.executables.edgelagacydriver); } var seleniumServer = new that.deps.remote.SeleniumServer(that.seleniumConfig.executables.selenium,opts); @@ -578,6 +590,7 @@ DirectDriverProvider.prototype.getNewDriver = function() { var allIECapabilities = driverOptions.toCapabilities(browserOptions.toCapabilities()); // start the local iedriver and connect to it driver = that.deps.ie.Driver.createSession(that.deps.ie.Options.fromCapabilities(allIECapabilities)); + } else if (browserName == 'MicrosoftEdge') { that.deps.edge = protractorModule.require('selenium-webdriver/edge'); @@ -596,6 +609,24 @@ DirectDriverProvider.prototype.getNewDriver = function() { // start the local edgedriver and connect to it var edgeServiceBuilder = new that.deps.edge.ServiceBuilder(that.seleniumConfig.executables.edgedriver); driver = that.deps.edge.Driver.createSession(allEdgeCapabilities, edgeServiceBuilder.build()); + } else if (browserName == 'MicrosoftEdgeLagacy') { + that.deps.edgelagacy = protractorModule.require('selenium-webdriver/edge'); + + that.logger.debug('Starting local edgelagacydriver with executable: ' + + that.seleniumConfig.executables.edgelagacydriver); + + var edgelagacyOptions = [new that.deps.edgelagacy.Options(), new that.deps.edgelagacy.Options()]; + _.forEach(['edgelagacydriverOptions', 'edgelagacyOptions'], function (capabilitiesKey, index) { + _.forIn(that.protConfig.capabilities[capabilitiesKey], function (value, key) { + that.deps.edgelagacy.Options.prototype[key].apply(edgelagacyOptions[index], value); + }); + }); + // merge capabilities + var allEdgeLagacyCapabilities = edgelagacyOptions[0].toCapabilities(edgelagacyOptions[1].toCapabilities()); + + // start the local edgelagacdriver and connect to it + var edgeLagacyServiceBuilder = new that.deps.edgelagacy.ServiceBuilder(that.seleniumConfig.executables.edgelagacydriver); + driver = that.deps.edgelagacy.Driver.createSession(allEdgeLagacyCapabilities, edgeLagacyServiceBuilder.build()); } else if (browserName == 'safari') { that.deps.safari = protractorModule.require('selenium-webdriver/safari'); diff --git a/src/runtimeResolver.js b/src/runtimeResolver.js index 799947ab..1e1eaa28 100644 --- a/src/runtimeResolver.js +++ b/src/runtimeResolver.js @@ -27,7 +27,7 @@ var platformNamePerOsTypeString = { mac64: 'mac' }; var supportedBrowserNames = [ - 'chrome','chromium','browser','chromeMobileEmulation','firefox','ie','safari','edge','chromeHeadless' + 'chrome','chromium','browser','chromeMobileEmulation','firefox','ie','safari','edge','edgelagacy','chromeHeadless' ]; var supportedPlatformNames = [ 'windows','mac','linux','android','ios','winphone' @@ -45,7 +45,7 @@ var supportedUI5Modes = [ /** * @typedef Runtime * @type {Object} - * @param {string(chrome|chromium|browser|firefox|ie|safari|edge)} browserName - browser name, default: chrome + * @param {string(chrome|chromium|browser|firefox|ie|safari|edge|edgelagacy)} browserName - browser name, default: chrome * @param {number} browserVersion - browser version, default: * * @param {string(windows|mac|linux|android|ios|winphone)} platformName - platform name, default: windows * @param {number} platformVersion - platform number like 7,8 for windows; 4.4,5.0 for android;, default: * From ab3602078e4a52f0c92a4353ba5d83f07a14d4a7 Mon Sep 17 00:00:00 2001 From: i866899 Date: Tue, 11 Feb 2020 15:32:22 -0500 Subject: [PATCH 02/23] implement get Edge (Chromium) WebDriver automatically from url --- conf/profile.conf.js | 8 ++++++++ src/connection/directConnectionProvider.js | 15 +++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/conf/profile.conf.js b/conf/profile.conf.js index 8b22a45f..9f50f25e 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -49,6 +49,14 @@ exports.config = { 'IEDriverServer_Win32_${connectionConfigs.direct.binaries.iedriver.version}.' + '${connectionConfigs.direct.binaries.iedriver.patch}.zip', executable: 'IEDriverServer.exe' }, + // edge based on chromium; Note: If on a Windows 64bit system the variable osTypeString returns win32 string (see uiveri5.js), then maintain the url below with e.g. edgedriver_win64.zip + edgedriver: { + version: '80.0.361.50', + unzip: true, + filename: 'msedgedriver.exe', + url: 'https://msedgedriver.azureedge.net/'+'${connectionConfigs.direct.binaries.edgedriver.version}'+'/edgedriver_'+'${osTypeString}'+'.zip', + executable: 'msedgedriver.exe' + }, geckodriver: { version: '{latest}', unzip: '${osTypeString == "win32" || osTypeString == "win64"}', diff --git a/src/connection/directConnectionProvider.js b/src/connection/directConnectionProvider.js index 2fde2655..907cc62e 100644 --- a/src/connection/directConnectionProvider.js +++ b/src/connection/directConnectionProvider.js @@ -18,7 +18,8 @@ var BINARIES = { SELENIUM: 'selenium', CHROMEDRIVER: 'chromedriver', IEDRIVER: 'iedriver', - GECKODRIVER: 'geckodriver' + GECKODRIVER: 'geckodriver', + EDGEDRIVER: 'edgedriver' }; /** @@ -197,13 +198,11 @@ DirectConnectionProvider.prototype.setupEnv = function() { }) ); } else if (browserName == 'edge') { - promises.push((function() { - var deferred = q.defer(); - var filename = path.join(that._getSeleniumRoot(), 'msedgedriver.exe'); - that.seleniumConfig.executables.edgedriver = filename; - deferred.resolve(filename); - return deferred.promise; - })()); + promises.push(that._getBinaryFileName(BINARIES.EDGEDRIVER).then( + function(filename){ + that.seleniumConfig.executables.edgedriver = filename; + }) + ); } else if (browserName == 'edgelagacy') { promises.push((function() { var deferred = q.defer(); From 23b7ae346ce7b94fcb198d1d38e16f794644c8bc Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 11 Feb 2020 21:04:43 -0500 Subject: [PATCH 03/23] minor change add comma --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f401eb6..5e1f4095 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ and brings most (and more) of its benefits to UI5 applications. * Does not depend on testability support in applications - works with autorefreshing views, resizing elements, animated transitions. * Declarative authentications - authentication flow over OAuth2 providers, etc. * Console operation, CI ready, fully configurable, no need for java (comming soon) or IDE. -* Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, EdgeLagacy Safari, iOS, Android. +* Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, EdgeLagacy, Safari, iOS, Android. * Open-source, modify to suite your specific neeeds. ## Requirements From 8e19be9d134a1021fa04529cb2fc035d55ffcb5f Mon Sep 17 00:00:00 2001 From: i866899 Date: Thu, 13 Feb 2020 21:38:18 -0500 Subject: [PATCH 04/23] version suffix string is added to the edge web driver --- conf/profile.conf.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/conf/profile.conf.js b/conf/profile.conf.js index 9f50f25e..1b5cccf1 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -50,12 +50,19 @@ exports.config = { executable: 'IEDriverServer.exe' }, // edge based on chromium; Note: If on a Windows 64bit system the variable osTypeString returns win32 string (see uiveri5.js), then maintain the url below with e.g. edgedriver_win64.zip + // TODO implement auto-update edge.latest edgedriver: { + //version: '{edge.latest}', version: '80.0.361.50', unzip: true, - filename: 'msedgedriver.exe', - url: 'https://msedgedriver.azureedge.net/'+'${connectionConfigs.direct.binaries.edgedriver.version}'+'/edgedriver_'+'${osTypeString}'+'.zip', - executable: 'msedgedriver.exe' + filename: '${osTypeString == "win32" || osTypeString == "win64" ? "msedgedriver.exe" : "msedgedriver"}', + baseurl: 'https://msedgedriver.azureedge.net', + url: '${connectionConfigs.direct.binaries.edgedriver.baseurl}/${connectionConfigs.direct.binaries.edgedriver.version}'+'/edgedriver_${osTypeString}.zip', + executable: { + win32: 'edgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', + win64: 'edgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', + mac64: 'edgedriver-${connectionConfigs.direct.binaries.edgedriver.version}' + } }, geckodriver: { version: '{latest}', From 6269f577844d51e011634ff1e64c07762d7324d8 Mon Sep 17 00:00:00 2001 From: i866899 Date: Thu, 13 Feb 2020 21:45:56 -0500 Subject: [PATCH 05/23] keep original driver executable name as prefix - msedgedriver --- conf/profile.conf.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/profile.conf.js b/conf/profile.conf.js index 1b5cccf1..7b251131 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -59,9 +59,9 @@ exports.config = { baseurl: 'https://msedgedriver.azureedge.net', url: '${connectionConfigs.direct.binaries.edgedriver.baseurl}/${connectionConfigs.direct.binaries.edgedriver.version}'+'/edgedriver_${osTypeString}.zip', executable: { - win32: 'edgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', - win64: 'edgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', - mac64: 'edgedriver-${connectionConfigs.direct.binaries.edgedriver.version}' + win32: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', + win64: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', + mac64: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}' } }, geckodriver: { From 389dc583c197c0d9398e0cd1a67c3e9c2642dca3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 16 Feb 2020 13:26:50 -0500 Subject: [PATCH 06/23] add edge.latest version --- driverVersions.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driverVersions.json b/driverVersions.json index 20d12ca8..7b0f6461 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,5 +1,8 @@ { "chrome": { "latest": 79 + }, + "edge": { + "latest": "80.0.361.50" } } From d148700a76d925f7d57a42b58ba16acbb25e0c15 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 16 Feb 2020 13:45:20 -0500 Subject: [PATCH 07/23] update edge.latest version --- driverVersions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driverVersions.json b/driverVersions.json index 7b0f6461..ef85b286 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -3,6 +3,6 @@ "latest": 79 }, "edge": { - "latest": "80.0.361.50" + "latest": 80 } } From 41a6c963af1f10df199700cc8b9061f88e97b739 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Feb 2020 10:33:22 -0500 Subject: [PATCH 08/23] add edge chromium version --- driverVersions.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driverVersions.json b/driverVersions.json index 45e39e88..fc97d264 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,5 +1,8 @@ { "chrome": { "latest": 80 + }, + "edge": { + "latest": "80.0.361.50" } } From 7a1ad325ef216f27521be5ae2f43329fc7366038 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Feb 2020 20:31:35 -0500 Subject: [PATCH 09/23] get edge chromium latest complete version from driverVersions.json --- conf/profile.conf.js | 6 +-- src/connection/latestDriverVersionResolver.js | 47 +++++++++++++++---- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/conf/profile.conf.js b/conf/profile.conf.js index 7b251131..a99ed317 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -50,14 +50,14 @@ exports.config = { executable: 'IEDriverServer.exe' }, // edge based on chromium; Note: If on a Windows 64bit system the variable osTypeString returns win32 string (see uiveri5.js), then maintain the url below with e.g. edgedriver_win64.zip - // TODO implement auto-update edge.latest edgedriver: { - //version: '{edge.latest}', - version: '80.0.361.50', + version: '{edge.latest}', unzip: true, filename: '${osTypeString == "win32" || osTypeString == "win64" ? "msedgedriver.exe" : "msedgedriver"}', baseurl: 'https://msedgedriver.azureedge.net', url: '${connectionConfigs.direct.binaries.edgedriver.baseurl}/${connectionConfigs.direct.binaries.edgedriver.version}'+'/edgedriver_${osTypeString}.zip', + latestCompleteVersionFileUrl: 'https://raw.githubusercontent.com/SAP/ui5-uiveri5/master/driverVersions.json', + //latestCompleteVersionFileUrl: 'https://raw.githubusercontent.com/danieljtag/ui5-uiveri5/master/driverVersions.json', executable: { win32: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', win64: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index 2225e637..857ce74d 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -9,16 +9,46 @@ function LatestDriverVersionResolver(config, instanceConfig, logger) { LatestDriverVersionResolver.prototype.getLatestVersion = function (binary) { var that = this; - return that._getLatestMajorVersion(binary) - .then(function (result) { - if (result.latestMajorVersion) { - binary.latestVersionUrl = binary.latestVersionUrl.replace(that.latestVersionRegexp, result.latestMajorVersion); - } - return that._getLatestDriverVersion(binary); - }); + if (binary.latestVersionFileUrl) { + return that._getLatestMajorVersionFromFile(binary) + .then(function (result) { + if (result.latestMajorVersion) { + binary.latestVersionUrl = binary.latestVersionUrl.replace(that.latestVersionRegexp, result.latestMajorVersion); + } + return that._getLatestDriverVersion(binary); + }); + } else if (binary.latestCompleteVersionFileUrl) { + return that._getLatestCompleteVersionFromFile(binary); + } +}; + +LatestDriverVersionResolver.prototype._getLatestCompleteVersionFromFile = function (binary) { + var that = this; + + that.logger.info('Check for latest complete version of: ' + binary.filename); + return q.Promise(function (resolveFn, rejectFn) { + if (binary.latestCompleteVersionFileUrl) { + request({ + url: binary.latestCompleteVersionFileUrl + }, function (error, res, body) { + if (_hasError(error, res)) { + rejectFn(_buildErrorObject(error, res, binary.filename, 'the latest major version number')); + } else { + that.logger.info('Check latest version file url: ' + binary.latestCompleteVersionFileUrl); + var latestVersion = _parseVersionNumber(body, binary.version); + that.logger.info('Found latest complete version of ' + binary.filename + ': ' + latestVersion); + resolveFn({ + latestVersion: latestVersion + }); + } + }); + } else { + resolveFn({}); + } + }); }; -LatestDriverVersionResolver.prototype._getLatestMajorVersion = function (binary) { +LatestDriverVersionResolver.prototype._getLatestMajorVersionFromFile = function (binary) { var that = this; that.logger.info('Check for latest major version of: ' + binary.filename); @@ -30,6 +60,7 @@ LatestDriverVersionResolver.prototype._getLatestMajorVersion = function (binary) if (_hasError(error, res)) { rejectFn(_buildErrorObject(error, res, binary.filename, 'the latest major version number')); } else { + that.logger.info('Check latest version file url: ' + binary.latestVersionFileUrl); var latestMajorVersion = _parseVersionNumber(body, binary.version); that.logger.info('Found latest major version of ' + binary.filename + ': ' + latestMajorVersion); resolveFn({ From 2910c0185ce8113d2572ebc53336fe6bb0dffcfb Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Feb 2020 20:34:03 -0500 Subject: [PATCH 10/23] cleanup --- conf/profile.conf.js | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/profile.conf.js b/conf/profile.conf.js index a99ed317..276d54f9 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -57,7 +57,6 @@ exports.config = { baseurl: 'https://msedgedriver.azureedge.net', url: '${connectionConfigs.direct.binaries.edgedriver.baseurl}/${connectionConfigs.direct.binaries.edgedriver.version}'+'/edgedriver_${osTypeString}.zip', latestCompleteVersionFileUrl: 'https://raw.githubusercontent.com/SAP/ui5-uiveri5/master/driverVersions.json', - //latestCompleteVersionFileUrl: 'https://raw.githubusercontent.com/danieljtag/ui5-uiveri5/master/driverVersions.json', executable: { win32: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', win64: 'msedgedriver-${connectionConfigs.direct.binaries.edgedriver.version}.exe', From a1640fc3893df57c18b7c8a12c2f356a52673305 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Feb 2020 21:04:58 -0500 Subject: [PATCH 11/23] fix for firefox --- src/connection/latestDriverVersionResolver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index 857ce74d..0462568a 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -9,7 +9,7 @@ function LatestDriverVersionResolver(config, instanceConfig, logger) { LatestDriverVersionResolver.prototype.getLatestVersion = function (binary) { var that = this; - if (binary.latestVersionFileUrl) { + if (binary.latestVersionFileUrl || binary.latestVersionUrlRedirect) { return that._getLatestMajorVersionFromFile(binary) .then(function (result) { if (result.latestMajorVersion) { From 696d6a88baa195b719e67708cd2f30bb2097c605 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Feb 2020 21:46:30 -0500 Subject: [PATCH 12/23] clear separation of the three styles to get latest versions --- src/connection/latestDriverVersionResolver.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index 0462568a..b0c9afb7 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -9,7 +9,7 @@ function LatestDriverVersionResolver(config, instanceConfig, logger) { LatestDriverVersionResolver.prototype.getLatestVersion = function (binary) { var that = this; - if (binary.latestVersionFileUrl || binary.latestVersionUrlRedirect) { + if (binary.latestVersionFileUrl) { return that._getLatestMajorVersionFromFile(binary) .then(function (result) { if (result.latestMajorVersion) { @@ -17,8 +17,12 @@ LatestDriverVersionResolver.prototype.getLatestVersion = function (binary) { } return that._getLatestDriverVersion(binary); }); + } else if (binary.latestVersionUrlRedirect) { + return that._getLatestDriverVersion(binary); } else if (binary.latestCompleteVersionFileUrl) { return that._getLatestCompleteVersionFromFile(binary); + } else { + that.logger.error('Please maintain profile.conf file!'); } }; From dd18bbf8b39b9de4ad28c6fcd6a4fd9b0f2717d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 23 Feb 2020 11:56:21 -0500 Subject: [PATCH 13/23] log message update --- src/connection/latestDriverVersionResolver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index b0c9afb7..e9273423 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -36,7 +36,7 @@ LatestDriverVersionResolver.prototype._getLatestCompleteVersionFromFile = functi url: binary.latestCompleteVersionFileUrl }, function (error, res, body) { if (_hasError(error, res)) { - rejectFn(_buildErrorObject(error, res, binary.filename, 'the latest major version number')); + rejectFn(_buildErrorObject(error, res, binary.filename, 'the latest version number')); } else { that.logger.info('Check latest version file url: ' + binary.latestCompleteVersionFileUrl); var latestVersion = _parseVersionNumber(body, binary.version); From cf75f1b7664f3a5393edc842449e439b1c0edaef Mon Sep 17 00:00:00 2001 From: i866899 Date: Mon, 24 Feb 2020 15:04:00 -0500 Subject: [PATCH 14/23] change if statement default on getLatestVersion (dependencies for integration tests) --- src/connection/latestDriverVersionResolver.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index e9273423..3e05a867 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -9,20 +9,19 @@ function LatestDriverVersionResolver(config, instanceConfig, logger) { LatestDriverVersionResolver.prototype.getLatestVersion = function (binary) { var that = this; - if (binary.latestVersionFileUrl) { - return that._getLatestMajorVersionFromFile(binary) - .then(function (result) { - if (result.latestMajorVersion) { - binary.latestVersionUrl = binary.latestVersionUrl.replace(that.latestVersionRegexp, result.latestMajorVersion); - } - return that._getLatestDriverVersion(binary); - }); - } else if (binary.latestVersionUrlRedirect) { + + if (binary.latestVersionUrlRedirect) { return that._getLatestDriverVersion(binary); - } else if (binary.latestCompleteVersionFileUrl) { + } else if (binary.latestCompleteVersionFileUrl) { return that._getLatestCompleteVersionFromFile(binary); } else { - that.logger.error('Please maintain profile.conf file!'); + return that._getLatestMajorVersionFromFile(binary) + .then(function (result) { + if (result.latestMajorVersion) { + binary.latestVersionUrl = binary.latestVersionUrl.replace(that.latestVersionRegexp, result.latestMajorVersion); + } + return that._getLatestDriverVersion(binary); + }); } }; From a0d51bcf87502fcc760a2bb327ff3a71399e35f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Mar 2020 23:25:06 -0400 Subject: [PATCH 15/23] fix typo; remove excessive log --- README.md | 2 +- conf/profile.conf.js | 6 ++-- docs/config/config.md | 2 +- src/connection/directConnectionProvider.js | 32 +++++++++---------- src/connection/latestDriverVersionResolver.js | 2 -- src/runtimeResolver.js | 4 +-- 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 5e1f4095..8f571f08 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ and brings most (and more) of its benefits to UI5 applications. * Does not depend on testability support in applications - works with autorefreshing views, resizing elements, animated transitions. * Declarative authentications - authentication flow over OAuth2 providers, etc. * Console operation, CI ready, fully configurable, no need for java (comming soon) or IDE. -* Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, EdgeLagacy, Safari, iOS, Android. +* Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, EdgeLegacy, Safari, iOS, Android. * Open-source, modify to suite your specific neeeds. ## Requirements diff --git a/conf/profile.conf.js b/conf/profile.conf.js index 276d54f9..3d491e0e 100644 --- a/conf/profile.conf.js +++ b/conf/profile.conf.js @@ -97,7 +97,7 @@ exports.config = { } }, /* maximize browser on all desktops to ensure consistent browser size */ - 'firefox,ie,edge,edgelagacy,safari,chrome,chromium': { + 'firefox,ie,edge,edgelegacy,safari,chrome,chromium': { 'windows,mac,linux': { '*': { remoteWebDriverOptions: { @@ -200,10 +200,10 @@ exports.config = { }, */ /* - 'edgelagacy': { + 'edgelegacy': { '*': { '*': { - edgelagacydriverOptions: { + edgelegacydriverOptions: { 'setPageLoadStrategy': ['normal'], } } diff --git a/docs/config/config.md b/docs/config/config.md index d44589ac..139511ba 100644 --- a/docs/config/config.md +++ b/docs/config/config.md @@ -38,7 +38,7 @@ Browser runtime is an object that specifies the browser and platform on which to You can specify only a few of the properties of a runtime. The rest are derived if possible or wildcards are assumed. Values and defaults: -* browserName - one of (chrome|firefox|ie|safari|edge|edgelagacy), browser name, default: chrome +* browserName - one of (chrome|firefox|ie|safari|edge|edgelegacy), browser name, default: chrome * browserVersion - browser version, default: * * platformName - one of (windows|mac|linux|android|ios|winphone)} - platform name, default: windows * platformVersion - platform number like 7,8 for windows; 4.4,5.0 for android;, default: * diff --git a/src/connection/directConnectionProvider.js b/src/connection/directConnectionProvider.js index 41e3d7ba..2db7bd97 100644 --- a/src/connection/directConnectionProvider.js +++ b/src/connection/directConnectionProvider.js @@ -86,8 +86,8 @@ DirectConnectionProvider.prototype.resolveCapabilitiesFromRuntime = function(run capabilities.browserName = 'internet explorer'; } else if (runtime.browserName === 'edge') { capabilities.browserName = 'MicrosoftEdge'; - } else if (runtime.browserName === 'edgelagacy') { - capabilities.browserName = 'MicrosoftEdgeLagacy'; + } else if (runtime.browserName === 'edgelegacy') { + capabilities.browserName = 'MicrosoftEdgeLegacy'; } else { capabilities.browserName = runtime.browserName; } @@ -203,11 +203,11 @@ DirectConnectionProvider.prototype.setupEnv = function() { that.seleniumConfig.executables.edgedriver = filename; }) ); - } else if (browserName == 'edgelagacy') { + } else if (browserName == 'edgelegacy') { promises.push((function() { var deferred = q.defer(); var filename = path.join(that._getSeleniumRoot(), 'MicrosoftWebDriver.exe'); - that.seleniumConfig.executables.edgelagacydriver = filename; + that.seleniumConfig.executables.edgelegacydriver = filename; deferred.resolve(filename); return deferred.promise; })()); @@ -478,8 +478,8 @@ DirectDriverProvider.prototype.getNewDriver = function() { opts.jvmArgs.push('-Dwebdriver.ie.driver=' + that.seleniumConfig.executables.iedriver); } else if (browserName == 'MicrosoftEdge') { opts.jvmArgs.push('-Dwebdriver.edge.driver=' + that.seleniumConfig.executables.edgedriver); - } else if (browserName == 'MicrosoftEdgeLagacy') { - opts.jvmArgs.push('-Dwebdriver.edgelagacy.driver=' + that.seleniumConfig.executables.edgelagacydriver); + } else if (browserName == 'MicrosoftEdgeLegacy') { + opts.jvmArgs.push('-Dwebdriver.edgelegacy.driver=' + that.seleniumConfig.executables.edgelegacydriver); } var seleniumServer = new that.deps.remote.SeleniumServer(that.seleniumConfig.executables.selenium,opts); @@ -596,24 +596,24 @@ DirectDriverProvider.prototype.getNewDriver = function() { // start the local edgedriver and connect to it var edgeServiceBuilder = new that.deps.edge.ServiceBuilder(that.seleniumConfig.executables.edgedriver); driver = that.deps.edge.Driver.createSession(allEdgeCapabilities, edgeServiceBuilder.build()); - } else if (browserName == 'MicrosoftEdgeLagacy') { - that.deps.edgelagacy = protractorModule.require('selenium-webdriver/edge'); + } else if (browserName == 'MicrosoftEdgeLegacy') { + that.deps.edgelegacy = protractorModule.require('selenium-webdriver/edge'); - that.logger.debug('Starting local edgelagacydriver with executable: ' + - that.seleniumConfig.executables.edgelagacydriver); + that.logger.debug('Starting local edgelegacydriver with executable: ' + + that.seleniumConfig.executables.edgelegacydriver); - var edgelagacyOptions = [new that.deps.edgelagacy.Options(), new that.deps.edgelagacy.Options()]; - _.forEach(['edgelagacydriverOptions', 'edgelagacyOptions'], function (capabilitiesKey, index) { + var edgelegacyOptions = [new that.deps.edgelegacy.Options(), new that.deps.edgelegacy.Options()]; + _.forEach(['edgelegacydriverOptions', 'edgelegacyOptions'], function (capabilitiesKey, index) { _.forIn(that.protConfig.capabilities[capabilitiesKey], function (value, key) { - that.deps.edgelagacy.Options.prototype[key].apply(edgelagacyOptions[index], value); + that.deps.edgelegacy.Options.prototype[key].apply(edgelegacyOptions[index], value); }); }); // merge capabilities - var allEdgeLagacyCapabilities = edgelagacyOptions[0].toCapabilities(edgelagacyOptions[1].toCapabilities()); + var allEdgeLegacyCapabilities = edgelegacyOptions[0].toCapabilities(edgelegacyOptions[1].toCapabilities()); // start the local edgelagacdriver and connect to it - var edgeLagacyServiceBuilder = new that.deps.edgelagacy.ServiceBuilder(that.seleniumConfig.executables.edgelagacydriver); - driver = that.deps.edgelagacy.Driver.createSession(allEdgeLagacyCapabilities, edgeLagacyServiceBuilder.build()); + var edgeLegacyServiceBuilder = new that.deps.edgelegacy.ServiceBuilder(that.seleniumConfig.executables.edgelegacydriver); + driver = that.deps.edgelegacy.Driver.createSession(allEdgeLegacyCapabilities, edgelegacyServiceBuilder.build()); } else if (browserName == 'safari') { that.deps.safari = protractorModule.require('selenium-webdriver/safari'); diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index 3e05a867..777fc579 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -37,7 +37,6 @@ LatestDriverVersionResolver.prototype._getLatestCompleteVersionFromFile = functi if (_hasError(error, res)) { rejectFn(_buildErrorObject(error, res, binary.filename, 'the latest version number')); } else { - that.logger.info('Check latest version file url: ' + binary.latestCompleteVersionFileUrl); var latestVersion = _parseVersionNumber(body, binary.version); that.logger.info('Found latest complete version of ' + binary.filename + ': ' + latestVersion); resolveFn({ @@ -63,7 +62,6 @@ LatestDriverVersionResolver.prototype._getLatestMajorVersionFromFile = function if (_hasError(error, res)) { rejectFn(_buildErrorObject(error, res, binary.filename, 'the latest major version number')); } else { - that.logger.info('Check latest version file url: ' + binary.latestVersionFileUrl); var latestMajorVersion = _parseVersionNumber(body, binary.version); that.logger.info('Found latest major version of ' + binary.filename + ': ' + latestMajorVersion); resolveFn({ diff --git a/src/runtimeResolver.js b/src/runtimeResolver.js index ad01ee09..18d7980b 100644 --- a/src/runtimeResolver.js +++ b/src/runtimeResolver.js @@ -27,7 +27,7 @@ var platformNamePerOsTypeString = { mac64: 'mac' }; var supportedBrowserNames = [ - 'chrome','chromium','browser','chromeMobileEmulation','firefox','ie','safari','edge','edgelagacy','chromeHeadless' + 'chrome','chromium','browser','chromeMobileEmulation','firefox','ie','safari','edge','edgelegacy','chromeHeadless' ]; var supportedPlatformNames = [ 'windows','mac','linux','android','ios','winphone' @@ -45,7 +45,7 @@ var supportedUI5Modes = [ /** * @typedef Runtime * @type {Object} - * @param {string(chrome|chromium|browser|firefox|ie|safari|edge|edgelagacy)} browserName - browser name, default: chrome + * @param {string(chrome|chromium|browser|firefox|ie|safari|edge|edgelegacy)} browserName - browser name, default: chrome * @param {number} browserVersion - browser version, default: * * @param {string(windows|mac|linux|android|ios|winphone)} platformName - platform name, default: windows * @param {number} platformVersion - platform number like 7,8 for windows; 4.4,5.0 for android;, default: * From b50131e6d1ab0411aafccb895a7831bf788e78bc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Mar 2020 23:31:16 -0400 Subject: [PATCH 16/23] fix typo --- src/connection/directConnectionProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/directConnectionProvider.js b/src/connection/directConnectionProvider.js index 2db7bd97..c1a2873e 100644 --- a/src/connection/directConnectionProvider.js +++ b/src/connection/directConnectionProvider.js @@ -611,7 +611,7 @@ DirectDriverProvider.prototype.getNewDriver = function() { // merge capabilities var allEdgeLegacyCapabilities = edgelegacyOptions[0].toCapabilities(edgelegacyOptions[1].toCapabilities()); - // start the local edgelagacdriver and connect to it + // start the local edgelegacy driver and connect to it var edgeLegacyServiceBuilder = new that.deps.edgelegacy.ServiceBuilder(that.seleniumConfig.executables.edgelegacydriver); driver = that.deps.edgelegacy.Driver.createSession(allEdgeLegacyCapabilities, edgelegacyServiceBuilder.build()); } else if (browserName == 'safari') { From a813f01ffba80f995e88ac187fb57a5626e4cffb Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Mar 2020 23:38:04 -0400 Subject: [PATCH 17/23] fix typo --- src/connection/directConnectionProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/directConnectionProvider.js b/src/connection/directConnectionProvider.js index c1a2873e..5ec38b27 100644 --- a/src/connection/directConnectionProvider.js +++ b/src/connection/directConnectionProvider.js @@ -613,7 +613,7 @@ DirectDriverProvider.prototype.getNewDriver = function() { // start the local edgelegacy driver and connect to it var edgeLegacyServiceBuilder = new that.deps.edgelegacy.ServiceBuilder(that.seleniumConfig.executables.edgelegacydriver); - driver = that.deps.edgelegacy.Driver.createSession(allEdgeLegacyCapabilities, edgelegacyServiceBuilder.build()); + driver = that.deps.edgelegacy.Driver.createSession(allEdgeLegacyCapabilities, edgeLegacyServiceBuilder.build()); } else if (browserName == 'safari') { that.deps.safari = protractorModule.require('selenium-webdriver/safari'); From 6c7812b047241f91cc44a6871b1a9bd325a64376 Mon Sep 17 00:00:00 2001 From: i866899 Date: Thu, 19 Mar 2020 09:13:49 -0400 Subject: [PATCH 18/23] removed unnecessary if (as per code review) --- src/connection/latestDriverVersionResolver.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/connection/latestDriverVersionResolver.js b/src/connection/latestDriverVersionResolver.js index 777fc579..4f8db504 100644 --- a/src/connection/latestDriverVersionResolver.js +++ b/src/connection/latestDriverVersionResolver.js @@ -10,18 +10,16 @@ function LatestDriverVersionResolver(config, instanceConfig, logger) { LatestDriverVersionResolver.prototype.getLatestVersion = function (binary) { var that = this; - if (binary.latestVersionUrlRedirect) { - return that._getLatestDriverVersion(binary); - } else if (binary.latestCompleteVersionFileUrl) { + if (binary.latestCompleteVersionFileUrl) { return that._getLatestCompleteVersionFromFile(binary); } else { return that._getLatestMajorVersionFromFile(binary) - .then(function (result) { - if (result.latestMajorVersion) { - binary.latestVersionUrl = binary.latestVersionUrl.replace(that.latestVersionRegexp, result.latestMajorVersion); - } - return that._getLatestDriverVersion(binary); - }); + .then(function (result) { + if (result.latestMajorVersion) { + binary.latestVersionUrl = binary.latestVersionUrl.replace(that.latestVersionRegexp, result.latestMajorVersion); + } + return that._getLatestDriverVersion(binary); + }); } }; From abb3441b6596101797859c776e7ecbce06738555 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Apr 2020 22:03:55 -0400 Subject: [PATCH 19/23] update chrome ver to resolve conflict --- driverVersions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driverVersions.json b/driverVersions.json index fc97d264..d0da35c8 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,6 +1,6 @@ { "chrome": { - "latest": 80 + "latest": 81 }, "edge": { "latest": "80.0.361.50" From 6181e6da07c346ae33065e915187c9bf5c40141f Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Apr 2020 22:15:02 -0400 Subject: [PATCH 20/23] resolve conflict --- driverVersions.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/driverVersions.json b/driverVersions.json index d0da35c8..547831c3 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,8 +1,5 @@ { "chrome": { "latest": 81 - }, - "edge": { - "latest": "80.0.361.50" } } From 90b8ad079669af504b684beb6f723a28d539fbd8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Apr 2020 22:16:41 -0400 Subject: [PATCH 21/23] resolve conflict --- driverVersions.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driverVersions.json b/driverVersions.json index 547831c3..d0da35c8 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,5 +1,8 @@ { "chrome": { "latest": 81 + }, + "edge": { + "latest": "80.0.361.50" } } From c66327586729818f9ea19adeaaa6aaa25d1d35ef Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Apr 2020 22:18:51 -0400 Subject: [PATCH 22/23] resolve conflict --- driverVersions.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/driverVersions.json b/driverVersions.json index d0da35c8..547831c3 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,8 +1,5 @@ { "chrome": { "latest": 81 - }, - "edge": { - "latest": "80.0.361.50" } } From 2cb63ee2b8a9de438ca2ad5303051b38612b3bc6 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Apr 2020 22:21:11 -0400 Subject: [PATCH 23/23] resolve conflict --- driverVersions.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driverVersions.json b/driverVersions.json index 547831c3..d0da35c8 100644 --- a/driverVersions.json +++ b/driverVersions.json @@ -1,5 +1,8 @@ { "chrome": { "latest": 81 + }, + "edge": { + "latest": "80.0.361.50" } }