webdriverIO and saucelab integration not working - webdriver-io

When I tried connecting webdriverIO with sauce labs, I'm getting error as
I'm using sauce service
$ ./node_modules/.bin/wdio ./config/int.wdio.conf.js
Execution of 1 spec files started at 2020-08-30T20:11:14.720Z
2020-08-30T20:11:14.768Z INFO #wdio/cli:launcher: Run onPrepare hook
2020-08-30T20:11:14.770Z INFO #wdio/cli:launcher: Run onWorkerStart hook
2020-08-30T20:11:14.772Z INFO #wdio/local-runner: Start worker 0-0 with arg: ./config/int.wdio.conf.js
[0-0] 2020-08-30T20:11:15.414Z INFO #wdio/local-runner: Run worker command: run
[0-0] 2020-08-30T20:11:15.422Z INFO webdriverio: Initiate new session using the ./protocol-stub protocol
[0-0] RUNNING in chrome - /e2e/test/login.int.spec.js
[0-0] 2020-08-30T20:11:15.704Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-08-30T20:11:15.706Z INFO webdriver: [POST] https://ondemand.saucelabs.com/wd/hub/session
[0-0] 2020-08-30T20:11:15.706Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: { browserName: 'chrome', acceptInsecureCerts: true },
firstMatch: [ {} ]
},
desiredCapabilities: { browserName: 'chrome', acceptInsecureCerts: true }
}
[0-0] 2020-08-30T20:11:15.733Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:443
at ClientRequest.<anonymous> (/node_modules/got/dist/source/core/index.js:891:25)
at Object.onceWrapper (events.js:418:26)
at ClientRequest.emit (events.js:323:22)
at ClientRequest.EventEmitter.emit (domain.js:482:12)
at ClientRequest.origin.emit (/test/node_modules/#szmarczak/http-timer/dist/source/index.js:39:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:311:20)
at TLSSocket.EventEmitter.emit (domain.js:482:12)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
[0-0] 2020-08-30T20:11:15.733Z ERROR #wdio/runner: Error: Failed to create session.
Unable to connect to "https://ondemand.saucelabs.com:443/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
at startWebDriverSession (/test/node_modules/webdriver/build/utils.js:45:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-0] Error: Failed to create session.
Unable to connect to "https://ondemand.saucelabs.com:443/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
[0-0] FAILED in chrome - /e2e/test/login.int.spec.js
2020-08-30T20:11:15.848Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:01
2020-08-30T20:11:15.849Z INFO #wdio/local-runner: Shutting down spawned worker
2020-08-30T20:11:16.102Z INFO #wdio/local-runner: Waiting for 0 to shut down gracefully
2020-08-30T20:11:16.102Z INFO #wdio/local-runner: shutting down
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
my wdio.config.js looks like
exports.config = {
runner: 'local',
user: 'test123',
key: '65434d10-276f-4305-adb4-93a39848d445',
region: 'us',
specs: [
'./e2e/test/*.int.spec.js'
],
exclude: [
'./e2e/test/*.prod.spec.js',
'./e2e/test/*.ie.int.spec.js'
],
maxInstances: 1,
capabilities: [
{
maxInstances: 1,
browserName: 'chrome',
acceptInsecureCerts: true
}
],
logLevel: 'info',
bail: 0,
baseUrl: 'https://www.google.com',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: ['sauce'],
framework: 'mocha',
reporters: ['mochawesome'],
mochaOpts: {
ui: 'bdd',
timeout: 60000
}
}
any idea how to fix this...

Related

Webdriver.io - videos from video-reporter are not generated properly (cannot be opened)

I am new to werbdiver.io and I was looking for best reporter. Allure reports are working fine for me after some configuration, but video reporter doesn't.
Everytime a test fails, something like a video trace is created, but I cannot play the video itself (it has just 150kb). The video is available also in allure report, naturally I cannot play it.
I am sending my config:
reporters: [
[video, {
saveAllVideos: false,
videoSlowdownMultiplier: 3,
videoRenderTimeout: 5,
outputDir: './allure-results'
}],
['allure', {
outputDir: './allure-results',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
}],
],
This is what I see as error (I guess the first line is important, I don't understand it as folder is existing):
[0-0] 2021-12-02T13:49:43.848Z ERROR #wdio/local-runner: Failed launching test session: Error: ENOENT: no such file or directory, stat 'C:\Data\Workspaces\webdriver\davinci-web-test\allure-results\My-Login-application--should-login-with-valid-credentials--CHROME--2021-12-02--14-49-22-485.mp4'
[0-0] at Object.statSync (fs.js:1131:3)
[0-0] at Object.statSync (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\graceful-fs\polyfills.js:312:16)
[0-0] at C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\helpers.js:120:70
[0-0] at Array.map ()
[0-0] at Object.waitForVideosToBeWritten
(C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\helpers.js:120:33)
[0-0] at Video.onExit (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\index.js:217:13)
[0-0] at process. (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\index.js:83:44)
[0-0] at process.emit (events.js:412:35)
[0-0] at process.emit (domain.js:475:12)
[0-0] at process.emit (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules#cspotcode\source-map-support\source-map-support.js:527:35)
[0-0] FAILED in chrome - C:\Data\Workspaces\webdriver\davinci-web-test\test\specs\example.ts
2021-12-02T13:49:43.878Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:25
try removing the output directory from the video reporter option :
reporters: [
['video', {
saveAllVideos: false, // If true, also saves videos for successful test cases
videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
}],
['allure', {
outputDir: './_results_/allure-raw',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
}],
],
and generate allure report as :
allure generate ./_results_/allure-raw

How do I test Expo application without building apk with appium?

I try to make some tests on my Expo application but I can't launch it with appium,
Here is my capabilities:
const capabilities = {
platformName: 'android',
deviceName: 'Emulator1',
automationName: 'UiAutomator2',
pkg: 'host.exp.exponent',
intentAction: 'android.intent.action.VIEW',
activity: 'host.exp.exponent.experience.HomeActivity',
appWaitForLaunch: true,
path: '/wd/',
port: 4723,
};
I got this :
ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] 2021-02-18T12:34:11.688Z ERROR webdriver: unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
at Object.getErrorFromResponseBody (/Users/kanka/Desktop/projects/expo-tests/node_modules/webdriver/build/utils.js:189:12)
at WebDriverRequest._request (/Users/kanka/Desktop/projects/expo-tests/node_modules/webdriver/build/request.js:168:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
[0-0] 2021-02-18T12:34:11.690Z ERROR #wdio/runner: Error: Failed to create session.
The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
at Object.startWebDriverSession (/Users/kanka/Desktop/projects/expo-tests/node_modules/webdriver/build/utils.js:68:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
2021-02-18T12:34:11.810Z DEBUG #wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in undefined - /tests/App.test.js
2021-02-18T12:34:11.811Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:01
If you are using "webdriverio": "^7.0.7" package: try updating your configuration file like this :
wdio.conf.js
exports.config = {
services: ['appium'],
port: 4723,
path: '/wd/hub/',
hostname: 'localhost',
protocol: 'http',
specs: [
'./test/specs/**/*.js',
],
maxInstances: 1,
capabilities: [{
platformName: 'android',
deviceName: 'test', // Change to the name of the AVD you're using
automationName: 'UiAutomator2',
appPackage: 'host.exp.exponent',
appActivity: 'host.exp.exponent.experience.HomeActivity',
appWaitActivity: 'host.exp.exponent.experience.HomeActivity',
intentAction: 'android.intent.action.MAIN',
appWaitForLaunch: true,
newCommandTimeout: 180,
uiautomator2ServerInstallTimeout: 100000,
adbExecTimeout: 1000000,
skipLogcatCapture: true,
}],
logLevel: 'trace',
bail: 0,
waitforTimeout: 10000,
connectionRetryTimeout: 1200000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
timeout: 180000,
},
};
path port are not in capabilities array.

How to launch protractor tests from remote jenkins?

I am unable to launch my protractor test from remote jenkins.
I am able to launch the test if the jenkins is installed in my local.
I am not sure if it is because of the direct connect. i also tried to launch the protractor test through selenium webdriver but couldnt make it. please help on this.
The error i am getting is
*[16:06:14] I/launcher - Running 1 instances of WebDriver
[16:06:14] I/direct - Using ChromeDriver directly...
[16:16:15] E/launcher - session not created
from timeout: Timed out receiving message from renderer: 600.000
(Session info: chrome=88.0.4324.104)
(Driver info: chromedriver=88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324#{#1784}),platform=Windows NT 10.0.17763 x86_64)
[16:16:15] E/launcher - SessionNotCreatedError: session not created
from timeout: Timed out receiving message from renderer: 600.000
(Session info: chrome=88.0.4324.104)
(Driver info: chromedriver=88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324#{#1784}),platform=Windows NT 10.0.17763 x86_64)
at Object.checkLegacyResponse (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\selenium-webdriver\lib\http.js:509:13)
at C:\home\Administrator\workspace\BlueNet_Automation\node_modules\selenium-webdriver\lib\http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.createSession()
at Function.createSession (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at Function.createSession (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\selenium-webdriver\chrome.js:761:15)
at Direct.getNewDriver (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\protractor\built\driverProviders\direct.js:77:33)
at Runner.createBrowser (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\protractor\built\runner.js:195:43)
at C:\home\Administrator\workspace\BlueNet_Automation\node_modules\protractor\built\runner.js:339:29
at _fulfilled (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\q\q.js:834:54)
at C:\home\Administrator\workspace\BlueNet_Automation\node_modules\q\q.js:863:30
at Promise.promise.promiseDispatch (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\q\q.js:796:13)
at C:\home\Administrator\workspace\BlueNet_Automation\node_modules\q\q.js:556:49
at runSingle (C:\home\Administrator\workspace\BlueNet_Automation\node_modules\q\q.js:137:13)
[16:16:15] E/launcher - Process exited with error code 199
npm ERR! Test failed. See above for more details.
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE*
my config.ts file is
*export let config: Config = {
// The address of a running selenium server.
//seleniumAddress: 'http://localhost:4444/wd/hub',
directConnect:true,
framework:'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
//allScriptsTimeout: 30000,
// Capabilities to be passed to the webdriver instance.
capabilities: {
browserName: 'chrome'
},
// Spec patterns are relative to the configuration file location passed
// to protractor (in this example conf.js).
// They may include glob patterns.
specs: ['../features/MasterEdit.feature'],
cucumberOpts: {
// require step definitions
//tags:"#SmokeTesting",
format:'json:./cucumberreport.json',
require: [
'./stepDefinitions/*.js', // accepts a glob,
]
},
onComplete: () =>{
var options = {
theme: 'bootstrap',
jsonFile: './cucumberreport.json',
output: './cucumber_report.html',
reportSuiteAsScenarios: true,
launchReport: true,
metadata: {
"App Version":"0.3.2",
"Test Environment": "STAGING",
"Browser": "Chrome 54.0.2840.98",
"Platform": "Windows 10",
"Parallel": "Scenarios",
"Executed": "Remote"
}
};
reporter.generate(options);
}*

Webdriverio Cucumberjs tests for a React Native app fails on AWS Device Farm - Socket hang up

I'm writing End-to-ends tests for a React Native app using WebdriverIo, Appium and Cucumberjs and deploying the tests on the AWS Device Farm.
The tests are working fine both on the Android simulator and on an actual real device. Though, on AWS, it throws errors such as (node:3113) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized" and RequestError: socket hang up. This is shown in more detail below:
[DeviceFarm] echo "Start Appium Node test"
Start Appium Node test
[DeviceFarm] npm run only-one-test-aws
> e2e-cucumber-wdio-appium#1.0.0 only-one-test-aws /tmp/scratch0EgKio.scratch/test-packageFvDXet
> npx wdio ./wdio.android.conf.js --spec ./features/recarga/verificacacaoCodigoDeAcessoInvalido.feature
Execution of 1 spec files started at 2020-06-04T18:23:19.220Z
2020-06-04T18:23:19.223Z INFO #wdio/cli:launcher: Run onPrepare hook
2020-06-04T18:23:19.254Z INFO #wdio/cli:launcher: Run onWorkerStart hook
2020-06-04T18:23:19.256Z INFO #wdio/local-runner: Start worker 0-0 with arg: ./wdio.android.conf.js,--spec,./features/recarga/verificacacaoCodigoDeAcessoInvalido.feature
[0-0] 2020-06-04T18:23:20.961Z INFO #wdio/local-runner: Run worker command: run
[0-0] 2020-06-04T18:23:21.062Z DEBUG #wdio/local-runner:utils: init remote session
[0-0] 2020-06-04T18:23:21.095Z INFO webdriverio: Initiate new session using the ./protocol-stub protocol
[0-0] RUNNING in undefined - /features/recarga/verificacacaoCodigoDeAcessoInvalido.feature
[0-0] 2020-06-04T18:23:22.697Z DEBUG #wdio/local-runner:utils: init remote session
[0-0] 2020-06-04T18:23:22.714Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-06-04T18:23:22.717Z INFO webdriver: [POST] http://127.0.0.1:4723/wd/hub/session
[0-0] 2020-06-04T18:23:22.717Z INFO webdriver: DATA {
capabilities: { alwaysMatch: {}, firstMatch: [ {} ] },
desiredCapabilities: {}
}
[0-0] (node:3113) DeprecationWarning: Got: "options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"
[0-0] 2020-06-04T18:24:52.853Z WARN webdriver: Request timed out! Consider increasing the "connectionRetryTimeout" option.
[0-0] 2020-06-04T18:24:52.856Z INFO webdriver: Retrying 1/3
[0-0] 2020-06-04T18:24:52.857Z INFO webdriver: [POST] http://127.0.0.1:4723/wd/hub/session
[0-0] 2020-06-04T18:24:52.857Z INFO webdriver: DATA {
capabilities: { alwaysMatch: {}, firstMatch: [ {} ] },
desiredCapabilities: {}
}
[0-0] 2020-06-04T18:24:54.004Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2020-06-04T18:24:54.004Z WARN webdriver: Request failed with status 500 due to An unknown server-side error occurred while processing the command. Original error: end of central directory record signature not found
[0-0] 2020-06-04T18:24:54.005Z INFO webdriver: Retrying 2/3
[0-0] 2020-06-04T18:24:54.014Z INFO webdriver: [POST] http://127.0.0.1:4723/wd/hub/session
[0-0] 2020-06-04T18:24:54.014Z INFO webdriver: DATA {
capabilities: { alwaysMatch: {}, firstMatch: [ {} ] },
desiredCapabilities: {}
}
[0-0] 2020-06-04T18:24:54.030Z ERROR webdriver: RequestError: socket hang up
at ClientRequest.<anonymous> (/tmp/scratch0EgKio.scratch/test-packageFvDXet/node_modules/got/dist/source/core/index.js:817:25)
at Object.onceWrapper (events.js:417:26)
at ClientRequest.emit (events.js:322:22)
at ClientRequest.EventEmitter.emit (domain.js:482:12)
at ClientRequest.origin.emit (/tmp/scratch0EgKio.scratch/test-packageFvDXet/node_modules/#szmarczak/http-timer/dist/source/index.js:39:20)
at Socket.socketOnEnd (_http_client.js:453:9)
at Socket.emit (events.js:322:22)
at Socket.EventEmitter.emit (domain.js:482:12)
at endReadableNT (_stream_readable.js:1187:12)
at connResetException (internal/errors.js:608:14)
at Socket.socketOnEnd (_http_client.js:453:23)
at Socket.emit (events.js:322:22)
at Socket.EventEmitter.emit (domain.js:482:12)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
[0-0] 2020-06-04T18:24:54.031Z ERROR #wdio/runner: Error: Failed to create session.
socket hang up
at startWebDriverSession (/tmp/scratch0EgKio.scratch/test-packageFvDXet/node_modules/webdriver/build/utils.js:45:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-0] Error: Failed to create session.
socket hang up
2020-06-04T18:24:54.147Z DEBUG #wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in undefined - /features/recarga/verificacacaoCodigoDeAcessoInvalido.feature
2020-06-04T18:24:54.148Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:01:34
2020-06-04T18:24:54.164Z INFO #wdio/local-runner: Shutting down spawned worker
2020-06-04T18:24:54.416Z INFO #wdio/local-runner: Waiting for 0 to shut down gracefully
2020-06-04T18:24:54.417Z INFO #wdio/local-runner: shutting down
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! e2e-cucumber-wdio-appium#1.0.0 only-one-test-aws: `npx wdio ./wdio.android.conf.js --spec ./features/recarga/verificacacaoCodigoDeAcessoInvalido.feature`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the e2e-cucumber-wdio-appium#1.0.0 only-one-test-aws script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/device-farm/.npm/_logs/2020-06-04T18_24_54_506Z-debug.log
[DEVICEFARM] ########### Entering phase post_test ###########
[DEVICEFARM] ########### Finish executing testspec ###########
[DEVICEFARM] ########### Setting upload permissions ###########
[DEVICEFARM] Tearing down your device. Your tests report will come shortly.
I also tried this question's solution by installing the webdriverio and #wdio/cli dependencies globally, though it did not work to me.
PS: I've already been able to successfully perform tests on the AWS Device Farm using webdriverio and cucumber. Though, these errors started to show up for me recently and I still have no clue on how to solve them.
Can someone please help me with this?

Protractor : ERROR - Unable to start a WebDriver session

I wrote test cases three months back at that time they worked fine now i want to run those test cases in another system so i did basic setup. When i try to run protractor test case now they are failing with 'Unable to start a WebDriver session'. I have tried so many solutions but they didn't work for me.
Here i am attaching my protractor.conf.js file and error details.
protractor.conf.js
'use strict';
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
baseUrl: 'http://localhost:' + (process.env.PORT || '3036'),
chromeOnly: true,
// To get the maximimum test screen size
onPrepare: function() {
browser.driver.manage().window().maximize();
},
// list of files / patterns to load in the browser
specs: [
'e2e/attributeSection/search_spec.js', 'e2e/attributeSection/create_spec.js',
'e2e/attributeSection/edit_spec.js', 'e2e/attribute/search_spec.js',
'e2e/attribute/create_spec.js', 'e2e/attribute/edit_spec.js',
'e2e/classification/search_spec.js', 'e2e/classification/create_spec.js',
'e2e/classification/edit_spec.js', 'e2e/classificationGroup/create_spec.js',
'e2e/classificationGroup/edit_spec.js'
],
exclude: [],
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
binary: 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe',
args: [],
extensions: [],
}
},
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 60000
}
};
Error in console
Using the selenium server at http://127.0.0.1:4444/wd/hub
[launcher] Running 1 instances of WebDriver
ERROR - Unable to start a WebDriver session.
C:\Users\Cronj- 4\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:145
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:145:16)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1552:9)
at Socket.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:442:13)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:155:22)
at Function.webdriver.WebDriver.createSession (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:129:30)
at [object Object].Builder.build (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:416:22)
at [object Object].DriverProvider.getNewDriver (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\driverProvider.js:38:7)
at [object Object].Runner.createBrowser (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:180:37)
at C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:257:21
at _fulfilled (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\Users\Cronj-4\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13)
Could anyone help me out? Thanks in advance
I believe the "chromeOnly" option got deprecated in v2.0.0.
chromeOnly: true,
This used to mean use "direct" mode without a selenium server. But since both firefox and chrome support direct mode, the property was renamed to "directConnect". So change that line to:
directConnect: true,
In this mode you don't need a selenium server, so you can drop the seleniumAddress property which is just confusing folks.
See https://github.com/angular/protractor/pull/1933/files
I ran webdriver-manager start in one command prompt and protractor in another command prompt then only test cases started running