Angular 2 - protractor(e2e) runtime error -


when run protractor error

[15:47:46] e/launcher - error: tserror: ? unable compile typescript conflicting library definitions 'selenium-webdriver' found @ 'g:/webservers/home/smsc/smsc2/modules/admin/node_modules/@types/selenium-webdriver/index.d.ts' , 'g:/webservers/home/smsc/smsc2/modules/admin /node_modules/protractor/node_modules/@types/selenium-webdriver/index.d.ts'. copy correct file 'typings' folder resolve conflict. (4090) 

i rebuild , reinstall protractor, nothing. use command run protractor

npm run protractor 

i read tutorial protractor , write test here enter link description here.

describe('angularjs homepage todo list', function() {     it('should add todo', function() {         browser.get('http://some-link/');          console.log('hi!');     }); }) 

protractor work fine example, not typescript. do?

the error message describes problem:

conflicting library definitions 'selenium-webdriver' found @ 'g:/webservers/home/smsc/smsc2/modules/admin/node_modules/@types/selenium-webdriver/index.d.ts' , 'g:/webservers/home/smsc/smsc2/modules/admin /node_modules/protractor/node_modules/@types/selenium-webdriver/index.d.ts'. copy correct file 'typings' folder resolve conflict. (4090)

you have 2 instances of selenium-webdriver typings file. typings files used typescript static type checking of applications use vanilla js libraries.

in case, @types/selenium-webdriver/index.d.ts file describes type shape of exported members of selenium (used internally protractor).

what need determine version of typings want use.

g:/webservers/home/smsc/smsc2/modules/admin/node_modules/@types/selenium-webdriver/index.d.ts g:/webservers/home/smsc/smsc2/modules/admin/node_modules/protractor/node_modules/@types/selenium-webdriver/index.d.ts 

it's these same file, in 2 locations. move 1 of them project's typings location here:

 g:/webservers/home/smsc/smsc2/modules/typings/selenium-webdriver/index.d.ts 

and looking bit deeper @ this, think bug protractor.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -