Right now in my Protractor test spec, Webstorm is complaining that all my element
and by
are \"Unresolvable type or element\"
Have you enabled the TypeScript library for angular-protractor?
Hope that helps! I know it's not native support but next best thing :-)
You could localise variable for your scope:
var element = protractor.element;
Ron H´s Answer worked for me, but i also had to download and install the following packages from the TypeScript community stubs.
selenium-webdriver
jasmine
karma-jasmine
After that also by.id()
, by.className()
, iit
, ddescribe
, toBeTurthy()
,... was recognized.
angular-protractor
no longer appears on the list of TypeScript community stubs, presumably because protractor is now officially supported within the WebStorm IDE.
So, in order to ger protractor code completion:
npm install -g protractor
/usr/local/lib/node_modules/protractor
.