I am getting and error as - Module ''selenium-webdriver'' has no exported member 'Promise', while trying to run protractor tests in webstorm

Venkat

Below is the error I am facing.. the same code is working when I compile it to JavaScript here "compile Typescript to JavaScript". I would like to execute it without generating the JavaScript files. Below is the code snippet.

getIndusElem(): Promise<string> {
    return element(by.id('industry')).getText()
  }

Thanks in advance for your help...

[15:10:39] I/launcher - Running 1 instances of WebDriver
[15:10:39] I/direct - Using ChromeDriver directly...
[15:10:45] E/launcher - Error: TSError: ⨯ Unable to compile TypeScript
e2e\app.po.ts (2,10): Module '"C:/Venkat/new/test/solaris/node_modules/@types/selenium-webdriver/index"' has no exported member 'Promise'. (2305)
    at getOutput (C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:307:15)
    at C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:336:16
    at Object.compile (C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:496:11)
    at Module.m._compile (C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:392:43)
    at Module._extensions..js (module.js:646:10)
    at Object.require.extensions.(anonymous function) [as .ts] (C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:395:12)
    at Module.load (C:\Venkat\new\test\solaris\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Venkat\new\test\solaris\e2e\context_selector.e2e-spec.ts:2:1)
    at Module._compile (module.js:635:30)
    at Module.m._compile (C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:392:23)
    at Module._extensions..js (module.js:646:10)
    at Object.require.extensions.(anonymous function) [as .ts] (C:\Venkat\new\test\solaris\node_modules\ts-node\src\index.ts:395:12)
    at Module.load (C:\Venkat\new\test\solaris\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at C:\Venkat\new\test\solaris\node_modules\jasmine\lib\jasmine.js:93:5
    at Array.forEach (<anonymous>)
    at Jasmine.loadSpecs (C:\Venkat\new\test\solaris\node_modules\jasmine\lib\jasmine.js:92:18)
    at Jasmine.execute (C:\Venkat\new\test\solaris\node_modules\jasmine\lib\jasmine.js:197:8)
    at C:\Venkat\new\test\solaris\node_modules\protractor\built\frameworks\jasmine.js:132:15
    at Function.promise (C:\Venkat\new\test\solaris\node_modules\protractor\node_modules\q\q.js:682:9)
    at C:\Venkat\new\test\solaris\node_modules\protractor\built\frameworks\jasmine.js:104:14

Here are my devDependencies..

"devDependencies": {
    "@angular/cli": "1.5.0-rc.3",
    "@angular/compiler-cli": "^5.0.0-rc.6",
    "@angular/language-service": "^5.0.0-rc.6",
    "@compodoc/compodoc": "^1.0.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "angular-split": "^0.2.7",
    "archiver": "2.0.0",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "normalize.css": "^7.0.0",
    "primeng": "^5.0.0",
    "protractor": "~5.1.2",
    "quill": "^1.3.4",
    "sync-request": "4.0.3",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2"
  }
Venkat

It worked by adding the below checks in config file. hope it will be helpfull for someone. "skipLibCheck": true, "noStrictGenericChecks": true.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

While implementing mapView i am getting error

From Dev

While creating a test script in selenium i am getting following error

From Dev

Selenium WebDriver, Chrome. I am getting errors NOT IMPLEMENTED during (in the beginning and ending) running Python tests

From Dev

I am trying to work with stem but getting error

From Dev

While installing openedx i am getting this error

From Dev

Im getting an error when trying to run a cucumber test, which manipulates a confirm dialogue using selenium-webdriver

From Dev

Getting Error while trying to run example test of Selenium Webdriver (WebdriverJS)

From Dev

Object #<Object> has no method 'getInstance' when trying to run Protractor tests

From Dev

i am getting error while i run pip install pokitdok?

From Dev

I am getting error while trying to load a activity from adapter class

From Dev

Angular 2 Module has no exported member

From Dev

While trying to load data using DSE graphloader I am getting the error - DSE Graph not configured to process queries

From Dev

Selenium WebDriver, Chrome. I am getting errors NOT IMPLEMENTED during (in the beginning and ending) running Python tests

From Dev

I am getting Error 424 while trying to save a file using Excel vba

From Dev

Can any one help me desipher this error that I am getting while trying to open a port with a dll

From Dev

Im getting an error when trying to run a cucumber test, which manipulates a confirm dialogue using selenium-webdriver

From Dev

I am getting this Error: while I am trying to install the Firmware for linux kernel Drivers

From Dev

Why am I getting a "Lock wait timeout exceeded" error while trying to update a MySQL entry?

From Dev

I am getting error while trying to load a activity from adapter class

From Dev

I am getting error while trying to check orientation of app?

From Dev

Why am I getting the error: "Value of type UICollectionView has no member dequeueReusableCell"?

From Dev

While trying to run "gradle test jacoco" in gitbash I am getting TestExecutionException, NoClassDefFoundError, ClassNotFoundException

From Dev

I am getting error while trying to login through valid email and password,which is stored in the database

From Dev

Why am I getting an error when I am trying to insert a while loop?

From Dev

Module has no exported member 'Link'

From Dev

ionic: module has no exported member

From Dev

while doing selenium testing-- I am getting an error

From Dev

I am getting an error while trying to install kali tools in ubuntu

From Dev

I am trying to use "sort" method but I am getting an error

Related Related

  1. 1

    While implementing mapView i am getting error

  2. 2

    While creating a test script in selenium i am getting following error

  3. 3

    Selenium WebDriver, Chrome. I am getting errors NOT IMPLEMENTED during (in the beginning and ending) running Python tests

  4. 4

    I am trying to work with stem but getting error

  5. 5

    While installing openedx i am getting this error

  6. 6

    Im getting an error when trying to run a cucumber test, which manipulates a confirm dialogue using selenium-webdriver

  7. 7

    Getting Error while trying to run example test of Selenium Webdriver (WebdriverJS)

  8. 8

    Object #<Object> has no method 'getInstance' when trying to run Protractor tests

  9. 9

    i am getting error while i run pip install pokitdok?

  10. 10

    I am getting error while trying to load a activity from adapter class

  11. 11

    Angular 2 Module has no exported member

  12. 12

    While trying to load data using DSE graphloader I am getting the error - DSE Graph not configured to process queries

  13. 13

    Selenium WebDriver, Chrome. I am getting errors NOT IMPLEMENTED during (in the beginning and ending) running Python tests

  14. 14

    I am getting Error 424 while trying to save a file using Excel vba

  15. 15

    Can any one help me desipher this error that I am getting while trying to open a port with a dll

  16. 16

    Im getting an error when trying to run a cucumber test, which manipulates a confirm dialogue using selenium-webdriver

  17. 17

    I am getting this Error: while I am trying to install the Firmware for linux kernel Drivers

  18. 18

    Why am I getting a "Lock wait timeout exceeded" error while trying to update a MySQL entry?

  19. 19

    I am getting error while trying to load a activity from adapter class

  20. 20

    I am getting error while trying to check orientation of app?

  21. 21

    Why am I getting the error: "Value of type UICollectionView has no member dequeueReusableCell"?

  22. 22

    While trying to run "gradle test jacoco" in gitbash I am getting TestExecutionException, NoClassDefFoundError, ClassNotFoundException

  23. 23

    I am getting error while trying to login through valid email and password,which is stored in the database

  24. 24

    Why am I getting an error when I am trying to insert a while loop?

  25. 25

    Module has no exported member 'Link'

  26. 26

    ionic: module has no exported member

  27. 27

    while doing selenium testing-- I am getting an error

  28. 28

    I am getting an error while trying to install kali tools in ubuntu

  29. 29

    I am trying to use "sort" method but I am getting an error

HotTag

Archive