// ------------------------------------------------------------------
// Notes on running tests
//
// 1. Using a node.js command prompt, start the webdriver: webdriver-manager start
// 2. Using another node.js command prompt, run the suite of tests from this file.
// protractor conf.js --suite homepage
// ------------------------------------------------------------------
var config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
parallel: {
logLevel: 1,
firstPassParallel: 6,
secondPassParallel: 2
},
// Patterns to exclude.
exclude: [
'signoff.fromsearchalert.spec.js',
'document.scope.spec.js',
'jasmine.spec.js',
'none.spec.js'
],
// -----------------------------------------------------------
// Tests To Run:
// Spec patterns are relative to the location of this config.
specs: [
//'spec/*_spec.js'
//'spec/a*_spec.js'
],
// When run without a command line parameter,
// all suites will run. If run with --suite=smoke, only the patterns matched
// by that suite will run.
suites: {
homepage: 'Specs/General/actionbar.spec.js',
adminPage: 'Specs/Admin/admin.*.spec.js',
dashboard: 'Specs/Dashboard/*.spec.js',
protocol: 'Specs/Protocol/*.spec.js',
implementation1: 'Specs/Implementation1/*.spec.js',
implementation2: 'Specs/Implementation2/*.spec.js',
bulkUpdate: 'Specs/BulkUpdate/bulkupdate.*.spec.js',
document: 'Specs/Document/document.*.spec.js',
documentScope: 'Specs/Scope/document.scope.spec.js',
protocolScope: 'Specs/Scope/protocol.scope.spec.js',
implScope: 'Specs/Scope/implementation.scope.spec.js',
history: 'Specs/History/*history.spec.js',
training: 'Specs/Training/training.spec.js',
techreview: 'Specs/TechReview/*.spec.js',
actionitem: 'Specs/ActionItems/*.spec.js',
searchAndBulkRefresh: 'Specs/Refresh/implsearchbulkedit.refresh.spec.js',
unlock: 'Specs/Unlock/*.spec.js'
// The order tests are run is not the order above.
// When this Jasmine test is executed in middle or rest of tests, it causes other tests to fail.
//jasmine: 'Specs/General/jasmine.spec.js'
},
// This function is called by power shell to list all suites in conf.js
printSuites: function () {
Object.keys(this.suites).forEach(function (key) {
console.log(key);
});
},
// -----------------------------------------------------------
// A callback function called once protractor is ready and available, and
// before the specs are executed
// You can specify a file containing code to run by setting onPrepare to
// the filename string.
onPrepare: function () {
var path = require('path');
if (!browser.params.disableReport) {
var jasmineReporters = require('jasmine-reporters');
// Add NUnit reporter to generate xml result
jasmine.getEnv().addReporter(new jasmineReporters.NUnitXmlReporter({
consolidateAll: true,
savePath: browser.params.resultPath
}));
}
if (!browser.params.disableVideo) {
var Uuid = require('uuid');
var VideoReporter = require('./VideoReporter.js');
var ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
var uuid = Uuid();
var videoReporter = new VideoReporter({
baseDirectory: browser.params.resultPath,
singleVideo: true,
createSubtitles: true,
singleVideoPath: browser.params.videoName + '.mkv',
ffmpegCmd: ffmpegPath,
ffmpegArgs: [
'-y',
'-f', 'gdigrab',
'-framerate', '12',
// select the browser by title
'-i', 'title=' + uuid + ' - Google Chrome',
'-c:v', 'libx264',
'-crf', '20'
]
});
jasmine.getEnv().addReporter(videoReporter);
browser.videoReporter = videoReporter;
// Change browser title before test so we can select the browser by title
browser.driver.get(browser.baseUrl + "--INTEGRATION-TEST/" + uuid);
}
browser.driver.manage().window().maximize();
var pretest = require('./Pretest/pretest.js');
return pretest.run();
},
onComplete: () => {
browser.close();
if (!browser.params.disableVideo) {
// Wait for video capture to complete
return browser.videoReporter.ffmpegExitPromise;
}
},
// Options to be passed to Jasmine-node.
// See the full list at https://github.com/juliemr/minijasminenode
jasmineNodeOpts: {
// onComplete will be called just before the driver quits.
onComplete: null,
// If true, display spec names.
isVerbose: true,
// If true, print colors to the terminal.
showColors: false,
// If true, include stack traces in failures.
includeStackTrace: true,
// Default time to wait in ms before a test fails.
defaultTimeoutInterval: 360000
},
// The timeout for each script run on the browser. This should be longer
// than the maximum time your application needs to stabilize between tasks.
allScriptsTimeout: 600000,
getPageTimeout: 500000,
// ----- Capabilities to be passed to the webdriver instance ----
// https://code.google.com/p/selenium/wiki/DesiredCapabilities
// https://code.google.com/p/selenium/source/browse/javascript/webdriver/capabilities.js
capabilities: {
//browserName: 'chrome', platform: Windows 8.1', version: '35'
//browserName: 'chrome'
},
// If you would like to run more than one instance of webdriver on the same
// tests, use multiCapabilities, which takes an array of capabilities.
// If this is specified, capabilities will be ignored.
// All browsers can be found here:
// http://selenium-release.storage.googleapis.com/index.html
multiCapabilities: [
{
'browserName': 'chrome',
'chromeOptions': {
// Disable GPU for video capture, otherwise chrome could not be captured by ffmpeg.
'args': ['--disable-gpu']
}
}
//{ 'browserName': 'internet explorer' }
],
// Selector for the element housing the angular app - this defaults to
// body, but is necessary if ng-app is on a descendant of <body>
rootElement: 'body',
// The params object will be passed directly to the protractor instance,
// and can be accessed from your test. It is an arbitrary object and can
// contain anything you may need in your test.
// This can be changed via the command line as:
// --params.login.adminUser 'Joe'
params: {
login: {
adminUserName: '',
adminUserPassword: 'ADMIN_USER_PASSWORD',
generalUserName: '',
generalUserPassword: 'GENERAL_USER_PASSWORD'
},
// The Run ID for the testing entities. It is a random string in
// enity names.
// For example, 'vyyUKXPZ' in '--INTEGRATIONTEST--vyyUKXPZ-BulkEdit-I03'
// Specifing an existing runId can skip creating new entities to
// save time.
// Leave it blank to create new ones. For example, in automation scripts.
runId: '',
noRunId: false,
// Wait before start, in seconds
azureSyncTimeout: 120,
resultPath: 'some\\path',
videoName: 'protractor-record',
disableVideo: false,
disableReport: false,
// It's AAD url of application for getting token.
authUrl: ''
},
// ----- More information for your tests ----
// A base URL for your application under test. Calls to protractor.get()
// with relative paths will be prepended with this.
baseUrl: 'https://some-url/',
// ----- The test framework -----
framework: 'jasmine2',
// ----- The cleanup step -----
//
// A callback function called once the tests have finished running and
// the webdriver instance has been shut down. It is passed the exit code
// (0 if the tests passed or 1 if not).
onCleanUp: function() {}
};
[15:54:09] I/start - java -Dwebdriver.gecko.driver=C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.29.1.exe -Dwebdriver.chrome.driver=C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_92.0.4515.107.exe -jar C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.141.59.jar -port 4444
[15:54:09] I/start - seleniumProcess.pid: 1772
15:54:10.526 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
15:54:10.703 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2021-08-09 15:54:10.854:INFO::main: Logging initialized @1135ms to org.seleniumhq.jetty9.util.log.StdErrLog
15:54:11.321 INFO [WebDriverServlet.] - Initialising WebDriverServlet
15:54:11.657 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
[15:54:11] I/start - Everything started
[15:54:11] I/start - Detached pid: 6424
[15:54:19] W/launcher - You have specified both capabilities and multiCapabilities. This will result in capabilities being ignored
[15:54:19] I/launcher - Running 1 instances of WebDriver
[15:54:19] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[15:54:22] W/runner - Ignoring unknown extra flags: base-url. This will be an error in future versions, please use --disableChecks flag to disable the Protractor CLI flag checks.
pretest.run
[15:54:23] E/launcher - connect ECONNREFUSED 127.0.0.1:443
[15:54:23] E/launcher - Error: connect ECONNREFUSED 127.0.0.1:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16)
[15:54:23] E/launcher - Process exited with error code 199
Specifying a version higher than chrome 79 gives the same error, on 79 or lower error is
at Object.checkLegacyResponse (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\lib\http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:95:5)
From: Task: WebDriver.createSession()
at Function.createSession (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at Function.createSession (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\chrome.js:761:15)
at createDriver (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\index.js:170:33)
at Builder.build (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\index.js:626:16)
at Hosted.getNewDriver (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
at Runner.createBrowser (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\protractor\built\runner.js:195:43)
at D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\protractor\built\runner.js:339:29
at _fulfilled (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\q\q.js:834:54)
at D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\q\q.js:863:30
at Promise.promise.promiseDispatch (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\q\q.js:796:13)
[15:39:34] E/launcher - Process exited with error code 199
Feature Request
---
- Reasons for adopting new feature
- Is this a breaking change? (How will this affect existing functionality)
Bug report
14.17.4
5.4.4
1.4.8
Win-2019
Your protractor configuration file
exports.config = config;
webdriver-manager update webdriver-manager start protactor conf.js
I/file_manager - creating folder C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium I/config_source - curl -oC:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/ I/config_source - curl -oC:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/ I/config_source - curl -oC:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases I/downloader - curl -oC:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium/selenium-server-standalone-3.141.59.jar https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar I/downloader - curl -oC:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium/chromedriver_92.0.4515.107.zip https://chromedriver.storage.googleapis.com/92.0.4515.43/chromedriver_win32.zip I/downloader - curl -oC:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium/geckodriver-v0.29.1.zip https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-win64.zip I/update - geckodriver: unzipping geckodriver-v0.29.1.zip I/update - chromedriver: unzipping chromedriver_92.0.4515.107.zip
[15:54:09] I/start - java -Dwebdriver.gecko.driver=C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.29.1.exe -Dwebdriver.chrome.driver=C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_92.0.4515.107.exe -jar C:\npm\prefix\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.141.59.jar -port 4444 [15:54:09] I/start - seleniumProcess.pid: 1772 15:54:10.526 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 15:54:10.703 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444 2021-08-09 15:54:10.854:INFO::main: Logging initialized @1135ms to org.seleniumhq.jetty9.util.log.StdErrLog 15:54:11.321 INFO [WebDriverServlet.] - Initialising WebDriverServlet
15:54:11.657 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
[15:54:11] I/start - Everything started
[15:54:11] I/start - Detached pid: 6424
[15:54:19] W/launcher - You have specified both capabilities and multiCapabilities. This will result in capabilities being ignored [15:54:19] I/launcher - Running 1 instances of WebDriver [15:54:19] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [15:54:22] W/runner - Ignoring unknown extra flags: base-url. This will be an error in future versions, please use --disableChecks flag to disable the Protractor CLI flag checks. pretest.run [15:54:23] E/launcher - connect ECONNREFUSED 127.0.0.1:443 [15:54:23] E/launcher - Error: connect ECONNREFUSED 127.0.0.1:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) [15:54:23] E/launcher - Process exited with error code 199
[15:39:30] W/launcher - You have specified both capabilities and multiCapabilities. This will result in capabilities being ignored [15:39:30] I/launcher - Running 1 instances of WebDriver [15:39:30] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [15:39:34] E/launcher - unknown error: cannot find Chrome binary Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'fv-az26-910', ip: '10.1.0.17', os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_292' Driver info: driver.version: unknown remote stacktrace: Backtrace: Ordinal0 [0x0110A113+1548563] Ordinal0 [0x0108DDA1+1039777] Ordinal0 [0x0100E485+517253] Ordinal0 [0x00F9C0F1+49393] Ordinal0 [0x00FBB797+178071] Ordinal0 [0x00FBB59D+177565] Ordinal0 [0x00FB95FB+169467] Ordinal0 [0x00FA160A+71178] Ordinal0 [0x00FA2690+75408] Ordinal0 [0x00FA2629+75305] Ordinal0 [0x010A71B7+1143223] GetHandleVerifier [0x011A2B46+507814] GetHandleVerifier [0x011A2864+507076] GetHandleVerifier [0x011A9F47+537511] GetHandleVerifier [0x011A3402+510050] Ordinal0 [0x0109F29C+1110684] Ordinal0 [0x010A938B+1151883] Ordinal0 [0x010A94F3+1152243] Ordinal0 [0x010A83F5+1147893] BaseThreadInitThunk [0x77910419+25] RtlGetAppContainerNamedObjectPath [0x77EA72FD+237] RtlGetAppContainerNamedObjectPath [0x77EA72CD+189]
[15:39:34] E/launcher - WebDriverError: unknown error: cannot find Chrome binary Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'fv-az26-910', ip: '10.1.0.17', os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_292' Driver info: driver.version: unknown remote stacktrace: Backtrace: Ordinal0 [0x0110A113+1548563] Ordinal0 [0x0108DDA1+1039777] Ordinal0 [0x0100E485+517253] Ordinal0 [0x00F9C0F1+49393] Ordinal0 [0x00FBB797+178071] Ordinal0 [0x00FBB59D+177565] Ordinal0 [0x00FB95FB+169467] Ordinal0 [0x00FA160A+71178] Ordinal0 [0x00FA2690+75408] Ordinal0 [0x00FA2629+75305] Ordinal0 [0x010A71B7+1143223] GetHandleVerifier [0x011A2B46+507814] GetHandleVerifier [0x011A2864+507076] GetHandleVerifier [0x011A9F47+537511] GetHandleVerifier [0x011A3402+510050] Ordinal0 [0x0109F29C+1110684] Ordinal0 [0x010A938B+1151883] Ordinal0 [0x010A94F3+1152243] Ordinal0 [0x010A83F5+1147893] BaseThreadInitThunk [0x77910419+25] RtlGetAppContainerNamedObjectPath [0x77EA72FD+237] RtlGetAppContainerNamedObjectPath [0x77EA72CD+189]
From: Task: WebDriver.createSession() at Function.createSession (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\lib\webdriver.js:769:24) at Function.createSession (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\chrome.js:761:15) at createDriver (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\index.js:170:33) at Builder.build (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\selenium-webdriver\index.js:626:16) at Hosted.getNewDriver (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\protractor\built\driverProviders\driverProvider.js:53:33) at Runner.createBrowser (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\protractor\built\runner.js:195:43) at D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\protractor\built\runner.js:339:29 at _fulfilled (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\q\q.js:834:54) at D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\q\q.js:863:30 at Promise.promise.promiseDispatch (D:\a\r1\a\drop\Deployment\Test\Protractor\node_modules\q\q.js:796:13) [15:39:34] E/launcher - Process exited with error code 199