I'm just starting out with Ionic and looking at the documentation I figured I would go down the route of using the built-in stuff over plain HTML.
So I have this HTML:
<ion-item>
<ion-input type="tel"
autofocus="true"
placeholder="Phone number"
name="phoneNumber"
formControlName="phoneNumber"></ion-input>
</ion-item>
And in my e2e test I want to write to that field so I tried to do:
$('ion-input[name="phoneNumber"]').sendKeys('12345678');
To which I get the following stack trace:
Failed: unknown error: cannot focus element
(Session info: chrome=68.0.3440.106)
(Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.13.6 x86_64)
WebDriverError: unknown error: cannot focus element
(Session info: chrome=68.0.3440.106)
(Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.13.6 x86_64)
at Object.checkLegacyResponse (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebElement.sendKeys()
at Driver.schedule (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/webdriver.js:807:17)
at WebElement.schedule_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
at WebElement.sendKeys (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/webdriver.js:2174:19)
at actionFn (/home/ba/workspace/ionic-test/node_modules/protractor/built/element.js:89:44)
at Array.map (<anonymous>)
at actionResults.getWebElements.then (/home/ba/workspace/ionic-test/node_modules/protractor/built/element.js:461:65)
at ManagedPromise.invokeCallback_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:1376:14)
at TaskQueue.execute_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:3084:14)
at TaskQueue.executeNext_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:3067:27)
at asyncRun (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:2927:27)Error
at ElementArrayFinder.applyAction_ (/home/ba/workspace/ionic-test/node_modules/protractor/built/element.js:459:27)
at ElementArrayFinder.(anonymous function).args [as sendKeys] (/home/ba/workspace/ionic-test/node_modules/protractor/built/element.js:91:29)
at ElementFinder.(anonymous function).args [as sendKeys] (/home/ba/workspace/ionic-test/node_modules/protractor/built/element.js:831:22)
at UserContext.<anonymous> (/home/ba/workspace/ionic-test/e2e/src/app.e2e-spec.ts:29:28)
at /home/ba/workspace/ionic-test/node_modules/jasminewd2/index.js:112:25
at new ManagedPromise (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:1077:7)
at ControlFlow.promise (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:2505:12)
at schedulerExecute (/home/ba/workspace/ionic-test/node_modules/jasminewd2/index.js:95:18)
at TaskQueue.execute_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:3084:14)
at TaskQueue.executeNext_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:3067:27)
From: Task: Run it("displays the login/signup screen") in control flow
at UserContext.<anonymous> (/home/ba/workspace/ionic-test/node_modules/jasminewd2/index.js:94:19)
at attempt (/home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4297:26)
at QueueRunner.run (/home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4217:20)
at runNext (/home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4257:20)
at /home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4264:13
at /home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4172:9
at /home/ba/workspace/ionic-test/node_modules/jasminewd2/index.js:64:48
at ControlFlow.emit (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/events.js:62:21)
at ControlFlow.shutdown_ (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:2674:10)
at shutdownTask_.MicroTask (/home/ba/workspace/ionic-test/node_modules/selenium-webdriver/lib/promise.js:2599:53)
From asynchronous test:
Error
at Suite.<anonymous> (/home/ba/workspace/ionic-test/e2e/src/app.e2e-spec.ts:16:3)
at addSpecsToSuite (/home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1107:25)
at Env.describe (/home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1074:7)
at describe (/home/ba/workspace/ionic-test/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4399:18)
at Object.<anonymous> (/home/ba/workspace/ionic-test/e2e/src/app.e2e-spec.ts:5:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module.m._compile (/home/ba/workspace/ionic-test/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/ba/workspace/ionic-test/node_modules/ts-node/src/index.ts:442:12)
By looking at the HTML I notice that the actual input is inside the shadow DOM so I tried accessing it by using:
element(by.deepCss('input[name="phoneNumber"]')).sendKeys('12345678');
But it gave me: Failed: element not visible and it seems like it's finding the <input type="hidden" …> that ion-input creates. So I changed it to search for input[type="tel"] as that's unique, but no luck as it now instead says there isn't any item.
The shadow DOM is new to me and I don't really know much about it, am I missing something obvious with how I should behave with it? I've attached a screenshot from my Chrome inspector view.
In ionic4, you can handle ion-input with this:
element(by.css('ion-input[name="phoneNumber"] input')).sendKeys('91296754')
After posting this I found the protractor-uisref-locator Protractor locator plugin which added support for another Ionic component. So I took that and changed it a bit and created this locator that can find my inner input for me. I have no idea why by.deepCss didn't work and would love to understand that better.
by.addLocator('ionInput', (name, opt_parentElement) => {
const using = opt_parentElement || document,
ionInput = using.querySelector('ion-input[name="' + name + '"]');
if (ionInput) {
return ionInput.shadowRoot.querySelector('input');
} else {
return;
}
});
And usage:
element(by.ionInput('phoneNumber')).sendKeys('12345678');
In Ionic 5, I needed to use the following:
var email_input = element(by.css('ion-input[ng-reflect-name="email"] input'));
email_input.sendKeys("somemail#somedomain.it")
Related
Is this possible? I've tried npm i github:ngrx/component-builds.git but I still get the error that the NgrxPush pipe could not be found.
I also get the warnings that it needs a peer of #angular/common^10.0.0 and #angular/core^10.0.0. Is this just not available yet in Ionic until Angular 10 is implemented?
The error:
core.js:6228 ERROR Error: Uncaught (in promise): Error: The pipe 'ngrxPush' could not be found!
Error: The pipe 'ngrxPush' could not be found!
at getPipeDef$1 (core.js:36858)
at ɵɵpipe (core.js:36816)
at ClockInButtonComponent_Template (template.html:1)
at executeTemplate (core.js:12156)
at renderView (core.js:11926)
at renderComponent (core.js:13505)
at renderChildComponents (core.js:11727)
at renderView (core.js:11952)
at renderComponent (core.js:13505)
at renderChildComponents (core.js:11727)
at resolvePromise (zone-evergreen.js:798)
at new ZoneAwarePromise (zone-evergreen.js:963)
at ionic-angular.js:2338
at ZoneDelegate.invoke (zone-evergreen.js:364)
at Object.onInvoke (core.js:41654)
at ZoneDelegate.invoke (zone-evergreen.js:363)
at Zone.run (zone-evergreen.js:123)
at NgZone.run (core.js:41427)
at AngularFrameworkDelegate.attachViewToDom (ionic-angular.js:2337)
at attachComponent (framework-delegate-d1eb6504.js:3)
Did you import the ReactiveComponentModule module?
I am using protractor Version 5.4.2 in window 10 OS, to script I use Eclipse Java EE IDE for Web Developers.Version: Photon Release (4.8.0) with Tern plugin.
I get no default proposals for browser.actions(). Also my execution is fails due to below error .
Message:
Failed: browser.actions(...).dragAndDrop(...).perfrom is not a function
Stack:
TypeError: browser.actions(...).dragAndDrop(...).perfrom is not a function
at UserContext. (F:\Learning\Repositories\protractor-sam-test-scripts\EclipsePro\src\com\sam\scriptjs\draganddrop.spec.js:15:45)
at C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2974:25)
at C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at
From: Task: Run it("Drag and drop") in control flow
at UserContext. (C:\Users\sam\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:19)
From asynchronous test:
Error
at Suite. (F:\Learning\Repositories\protractor-sam-test-scripts\EclipsePro\src\com\sam\scriptjs\draganddrop.spec.js:11:4)
at Object. (F:\Learning\Repositories\protractor-sam-test-scripts\EclipsePro\src\com\sam\scriptjs\draganddrop.spec.js:2:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
I already updated my protractor and webdriver-manager versions , but the error still persists.
Please see my spec.js
//draganddrop.spec.js
describe('drag and drop trial', function() {
//Each single it function is a test script
it('first spec', function() {
browser.driver.get('https://codef0rmer.github.io/angular-dragdrop/#!/');
expect(browser.getTitle()).toEqual('Drag and Drop for AngularJS');
});
it('Drag and drop', function() {
var from=element(by.model('list1'));
var to=element(by.model('list2'));
//drag and drop source to Destination
browser.actions().dragAndDrop(from,to).perfrom();
browser.sleep(7500);
});
})
Try with this code:
//1st way: dragging one element to another
browser.actions().mouseDown(from).mouseMove(to).mouseUp().perform();
There are 3 ways of implementing dragAndDrop in which I found this approach in protractor the most fitting.
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)
I am trying to automate and rum a simple register form but i am getting error saying "Failed: Fn is not a function". Below is my code
describe('Locator testing by model', function(){
it('automate user register form', function(){
browser.get('http://www.way2automation.com/angularjs-protractor/registeration/#/login');
element(by.model('Auth.user.name')).sendKeys('angular');
element(by.model('Auth.user.password')).sendKeys('password');
element(by.model('model[options.key]')).sendKeys('zafaque');
element(by.buttonText('Login')).click();
browser.wait(3000);
});
});
below is the error detail
1) Locator testing by model automate user register form
Message:
Failed: fn is not a function
Stack:
TypeError: fn is not a function
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:716:14
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (node.js:369:9)
From: Task: <anonymous>
at pollCondition (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2359:16)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2355:9
at new ManagedPromise (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1082:7)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2354:14
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2775:27
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (node.js:369:9)
From: Task: <anonymous wait>
at ControlFlow.wait (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2352:17)
at Driver.wait (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:712:29)
at ProtractorBrowser.to.(anonymous function) [as wait] (/usr/local/lib/node_modules/protractor/built/browser.js:60:29)
at Object.<anonymous> (/Users/zafaque/WebstormProjects/autotation/udemyProject/loginTest.js:12:17)
at /usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:94:23
at new ManagedPromise (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1082:7)
at controlFlowExecute (/usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:80:18)
at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25
From: Task: Run it("automate user register form") in control flow
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/node_modules/jasminewd2/index.js:79:14)
From asynchronous test:
Error
at Suite.<anonymous> (/Users/zafaque/WebstormProjects/autotation/udemyProject/loginTest.js:6:5)
at Object.<anonymous> (/Users/zafaque/WebstormProjects/autotation/udemyProject/loginTest.js:4:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
You are using browser.wait() incorrectly. Refer the official documentation for correct usage here
browser.wait() accepts params in the below order
first argument is a condition which can be a function or a
webdriver.promise.Promise or a Expected Condition Second Argument is
the timeout
But you are passing timeout as the first argument. Incase you just wait a conditionless wait - Just use browser.sleep(3000)
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$