I have this kind of code:
get alcoholLink() {
return $('a=Alcohol');
}
which is valid webriverio selector for getting an element with text 'Alcohol'.
But IntelliJ IDEA underlines it red and displays "unexpected token" error.
Does anybody know how to tweak IntelliJ settings in order to recognize the code as valid webdriverio selector?
Thanks, mismas
IDEA treats $
as jQuery and thus jQuery-CSS
language is auto-injected in $()
calls. And 'a=Alcohol'
is not a valid CSS selector syntax - thus the error; deselecting the js: JQuery selectors language injection in Settings | Editor | Language Injections should help to get rid of the issue: