Protractor: Failed: stale element reference: element is not attached to the page document for points in map - protractor

I use the following function in the protractor test. Test run causes stale element reference: element is not attached to the page document is thrown. The test is being executed for various page versions.
openPointDescription: function(){
widget.points.each(function(point){
widget.pointDescription.container.isPresent().then(function(present){
if (!present)
{
browser.actions().mouseMove(point).click().perform().then();
}
})
});
}
Where:
widget.points: element.all(by.tagWithAttributeRegex('img', 'src', '.*marker.png')),
pointDescritption.container: element(by.css('div[class=bp-point-desc]')),
Stacktrace indicates mouseMove function
[chrome #01-13] - Failed: stale element reference: element is not attached to the page document
[chrome #01-13] (Session info: headless chrome=90.0.4430.85)
[chrome #01-13] (Driver info: chromedriver=90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430#{#429}),platform=Linux 4.4.0-187-generic x86_64)
[chrome #01-13] (Session info: headless chrome=90.0.4430.85)
[chrome #01-13] (Driver info: chromedriver=90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430#{#429}),platform=Linux 4.4.0-187-generic x86_64)
[chrome #01-13] at Object.checkLegacyResponse (/var/app/node_modules/selenium-webdriver/lib/error.js:546:15)
[chrome #01-13] at parseHttpResponse (/var/app/node_modules/selenium-webdriver/lib/http.js:509:13)
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/http.js:441:30
[chrome #01-13] at processTicksAndRejections (internal/process/task_queues.js:97:5)
[chrome #01-13] From: Task: mouseMove
[chrome #01-13] at thenableWebDriverProxy.schedule (/var/app/node_modules/selenium-webdriver/lib/webdriver.js:807:17)
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/actions.js:124:23
[chrome #01-13] at Array.map (<anonymous>)
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/actions.js:123:29
[chrome #01-13] at TaskQueue.execute_ (/var/app/node_modules/selenium-webdriver/lib/promise.js:3084:14)
[chrome #01-13] at TaskQueue.executeNext_ (/var/app/node_modules/selenium-webdriver/lib/promise.js:3067:27)
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/promise.js:2927:27
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/promise.js:668:7
[chrome #01-13] at processTicksAndRejections (internal/process/task_queues.js:97:5)
[chrome #01-13] From: Task: ActionSequence.perform
[chrome #01-13] at ActionSequence.perform (/var/app/node_modules/selenium-webdriver/lib/actions.js:122:33)
[chrome #01-13] at /var/app/src/widget/widget.pageController.js:31:68
[chrome #01-13] at ManagedPromise.invokeCallback_ (/var/app/node_modules/selenium-webdriver/lib/promise.js:1376:14)
[chrome #01-13] at TaskQueue.execute_ (/var/app/node_modules/selenium-webdriver/lib/promise.js:3084:14)
[chrome #01-13] at TaskQueue.executeNext_ (/var/app/node_modules/selenium-webdriver/lib/promise.js:3067:27)
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/promise.js:2927:27
[chrome #01-13] at /var/app/node_modules/selenium-webdriver/lib/promise.js:668:7
[chrome #01-13] at processTicksAndRejections (internal/process/task_queues.js:97:5)
[chrome #01-13] From: Task: Run it("displays point description after clicking on a valid point") in control flow
[chrome #01-13] at UserContext.<anonymous> (/var/app/node_modules/jasminewd2/index.js:94:19)
[chrome #01-13] From asynchronous test:
[chrome #01-13] Error
[chrome #01-13] at Suite.<anonymous> (/var/app/src/widget/spec/genericSpec.js:21:13)
[chrome #01-13] at Object.generateDescribe (/var/app/src/widget/spec/genericSpec.js:8:9)
[chrome #01-13] at Object.<anonymous> (/var/app/src/widget/spec/widget5.9.spec.js:5:13)
[chrome #01-13] at Module._compile (internal/modules/cjs/loader.js:1147:30)
[chrome #01-13] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
[chrome #01-13] at Module.load (internal/modules/cjs/loader.js:996:32)
[chrome #01-13]

90% chance the problem is .each. Try with for loop instead. But I never worked with .then syntax, so using async/await
async openPointDescription: function() {
for(let i=0; i<await widget.points.count(); i++) {
if (!(await widget.pointDescription.container.isPresent())) { // it looks like this has to go outside of for loop
await browser.actions().mouseMove(widget.points.get(i)).perform()
await widget.points.get(i).click()
}
}

Related

The element to find the link does not work instead browser.driver.findElement works

The login page of my app is not built with angular, but after the login, the pages that its lands and remaining app is built with angularjs.
To get the url I used browser.driver.get('//appurl'); which works fine.
After the login, element(by.css('a[href="#!/test"]')).click(); does not work, where as browser.driver.findElement(by.css('a[href="#!/test"]')).click(); worked !!
Below is the error
ScriptTimeoutError: script timeout: result was not received in 11
seconds
(Session info: chrome...
(Driver info: ...,...)
at Object.checkLegacyResponse (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: Protractor.waitForAngular() - Locator: By(css selector, a[href="#!/workpieces"])
at thenableWebDriverProxy.schedule (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at ProtractorBrowser.executeAsyncScript_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\browser.js:425:28)
at angularAppRoot.then (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\browser.js:456:33)
at ManagedPromise.invokeCallback_
(C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1376:14)
at TaskQueue.execute_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at process._tickCallback (internal/process/next_tick.js:68:7)Error
at ElementArrayFinder.applyAction_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\element.js:459:27)
at ElementArrayFinder.(anonymous function).args [as click] (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\element.js:91:29)
at ElementFinder.(anonymous function).args [as click] (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\built\element.js:831:22)
at UserContext. (C:\Users\testuser\repos\test\spec.js:21:53)
at C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
From: Task: Run it("Test") in control flow
at UserContext. (C:\Users\testuser\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:19)
From asynchronous test:
Error
at Suite. (C:\Users\testuser\repos\test\spec.js:20:5)
at Object. (C:\Users\testuser\repos\test\spec.js:1:63)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)

Webdriver keep on executing the scenarios without terminating the job

I used the below protractor cucumber multiCapabilities config file to execute my scenarios. While executing the config file, First time Chrome and Firefox got launched and my expected scenario got executed. But after the execution the job not got finished. The webdriver keep on launching the browsers and ending with 0 scenarios / 0 steps / 0m00.000s results. Can anyone help me to handle this situation.
Config file:
exports.config = {
seleniumAddress: "http://localhost:4444/wd/hub",
baseUrl: "https://www.google.co.in/",
multiCapabilities: [
{
browserName: "chrome",
shardTestFiles: true,
maxInstances: 1
},
{
browserName: "firefox",
shardTestFiles: true,
maxInstances: 1
}
],
framework: "custom",
frameworkPath: require.resolve("protractor-cucumber-framework"),
specs: ["../features/*.feature"],
cucumberOpts: {
format: 'json:results.json',
require: ["../stepDefinitions/*.js"],
tags: ['#sample']
}
};
Output:
I/launcher - 2 instance(s) of WebDriver still running
I/testLogger -
------------------------------------
I/testLogger - [chrome #01-0] PID: XXXXX
#Expected scenario got executed
I/launcher - 2 instance(s) of WebDriver still running
I/testLogger -
------------------------------------
I/testLogger - [firefox #11-0] PID: XXXXX
#Expected scenario got executed
I/launcher - 2 instance(s) of WebDriver still running
I/testLogger -
------------------------------------
I/testLogger - [firefox #11-1] PID: XXXXX
[firefox #11-1] 0 scenarios
[firefox #11-1] 0 steps
[firefox #11-1] 0m00.000s
I/launcher - 2 instance(s) of WebDriver still running
I/testLogger -
------------------------------------
I/testLogger - [chrome #01-1] PID: XXXXX
[chrome #01-1] 0 scenarios
[chrome #01-1] 0 steps
[chrome #01-1] 0m00.000s
And the webdriver keep on execution the scenarios until I manually terminate the job.

protractor tutorial step throwing "element not visible"

I'm new to protractor and am going through the tutorial. The setup and Step 0 worked fine for me but I had an unexpected error in Step 1:
$ protractor conf.js
[13:11:41] I/launcher - Running 1 instances of WebDriver
[13:11:41] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
Started
seeking `first`
seeking `second`
seeking `gobutton`
seeking `latest`
F
Failures:
1) Protractor Demo App should add one and two
Message:
Failed: element not visible
(Session info: chrome=60.0.3112.78)
(Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux 4.4.0-87-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 43 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'pfuntner1', ip: '9.42.83.35', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-87-generic', java.version: '1.8.0'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=/tmp/.org.chromium.Chromium.ZhadTr}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.78, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
Session ID: cf611f619dbf2069413885ed9bcbba17
Stack:
ElementNotVisibleError: element not visible
(Session info: chrome=60.0.3112.78)
(Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux 4.4.0-87-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 43 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'pfuntner1', ip: '9.42.83.35', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-87-generic', java.version: '1.8.0'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=/tmp/.org.chromium.Chromium.ZhadTr}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.78, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
.
.
.
I added debugging statements to spec.js to try to identify what element it can't find. It appears to find the two input fields and the button fine but does not find the output field.
Here is my spec.js:
// spec.js
describe('Protractor Demo App', function() {
it('should add one and two', function() {
browser.get('http://juliemr.github.io/protractor-demo/');
console.log("seeking `first`");
element(by.model('first')).sendKeys(1);
console.log("seeking `second`");
element(by.model('second')).sendKeys(2);
console.log("seeking `gobutton`");
element(by.id('gobutton')).click();
console.log("seeking `latest`");
expect(element(by.binding('latest')).getText()).toEqual('5'); // This is wrong!
});
});
Am I doing something wrong?
Now there are few possible things happening here
The element that is returned by element(by.binding('latest')) is not the correct one
There are multiple elements matching element(by.binding('latest')) and the first one is being returned to you
The element being returned to you is not visible on the screen. Chromedriver is very specific when it comes to taking actions on element which are visible to the user. If the element is not visible to user a automation shouldn't be able to simulate action on it (not 100% true, because some actions can still be taken).
So make sure you are getting the right element and there are no multiple matches

Not able to run Protractor tests (5.0.0) on IE11

Protractor : 5.0.0, IE11, IEDriverServer_Win32_3.0.0.exe
conf file:
capabilities: {
browserName: 'internet explorer',
}
localSeleniumStandaloneOpts: {
jvmArgs: ["-Dwebdriver.ie.driver=.\\node_modules\\protractor\\node_modules\\webdriver-manager\\selenium\\IEDriverServer.exe"]
}
IE browsers opens up but doesn't do anything. Following is the error
[11:12:22] I/local - Starting selenium standalone server...
[11:12:22] I/launcher - Running 1 instances of WebDriver
[11:12:23] I/local - Selenium standalone server started at http://192.168.56.1:53122/wd/hub
Started
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
F[11:12:26] E/launcher - Unable to get browser (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'RLAPTOP', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:36498/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: e830e362-bb50-41bb-8b2d-cd4bd35f6d4d
[11:12:26] E/launcher - NoSuchWindowError: Unable to get browser (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'RLAPTOP', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:36498/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: e830e362-bb50-41bb-8b2d-cd4bd35f6d4d
at WebDriverError (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\error.js:27:5)
at NoSuchWindowError (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\error.js:192:5)
at Object.checkLegacyResponse (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\error.js:505:15)
at parseHttpResponse (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\http.js:440:13)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.getCurrentUrl()
at WebDriver.schedule (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\webdriver.js:816:17)
at WebDriver.getCurrentUrl (C:\QA\testingmaster\tests\protractor_tests\node_modules\selenium-webdriver\lib\webdriver.js:1002:17)
at ScreenshotReporter.specDone (C:\QA\testingmaster\tests\protractor_tests\e2e\jasmine_reporters\screenshot_reporter.js:12:22)
at dispatch (C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1966:28)
at ReportDispatcher.specDone (C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1949:11)
at Spec.specResultCallback [as resultCallback] (C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:903:18)
at complete (C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:368:12)
at QueueRunner.clearStack (C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:660:9)
at QueueRunner.run (C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1881:12)
at C:\QA\testingmaster\tests\protractor_tests\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1898:16
[11:12:26] E/launcher - Process exited with error code 199
Any suggestions? Do i need to start selenium server as well manually ?

protractor sets error without opening browser

i download a new ionic project and i am trying to test the header contains these elements ""
my config file is
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../www/head.spec.js'],
multiCapabilities: [
{
browserName: 'chrome'
}]
}
named this as e2e.js
my test case file is
describe('header Module', function(){
var header;
beforeEach(function() {
header = element(by.css('title'));
});
it('should check title text',function(){
expect(header.getText()).toContain('Ionic Blank Starter');
});
});
and i named this as head.spec.js
my issue is that i could see the browser opened and my protractor sends an error msg
empresss-Mac-mini:myApp admin$ protractor test/e2e.js
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest. (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172:16)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process.tickCallback (node.js:353:17)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at [object Object].Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
at [object Object].DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.js:182:37)
at /usr/local/lib/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
could someone help to fix this issue
when i try to webdriver-manager update err msg is displayed
empresss-Mac-mini:~ admin$ webdriver-manager update
fs.js:799
return binding.mkdir(pathModule._makeLong(path),
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor/selenium'
at Error (native)
at Object.fs.mkdirSync (fs.js:799:18)
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/bin/webdriver-manager:126:6)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
empresss-Mac-mini:~ admin$