I am getting webdriver error in intelliJ IDE while using Selenium? - selenium

I am using intelliJ IDE for Selenium Project. This error does not happen in Ellipse IDE. Here is a snapshot of the issue. This code works perfectly in Ellipse. I have added dependencies jar files for Selenium.

Errors are underlined with red, this is green. I think it just a spelling error indication.
Also the "error" is in a string, you cannot get a syntax or runtime error in a string.
If you get a error during running the tests please add that error and stacktrace to your question and I will try to assist you.

These under waved warnings are spellchecking warings and intellij idea has an integrated spell checker.
Spellchecker configuration:
You can deactivate the spell checking:
You can save that word on a project level to your spelling directory:
These two options will remove the warning. Making this warning less catchy by changing the color scheme could be an other option:

Related

IntelliJ inspections not working after update to 2021.1

Suddenly the IntelliJ editor inspections have stopped working.
The syntax highlighting, the compiler errors and so on are not being shown.
The style highlighting works tough.
The inspections in the project navigation tree work and show compilation errors.
gradle build shows compilation errors too.
After updating to IntelliJ 2021.1, the Plugin for Swagger is not compatible anymore.
It seems to break the correct display of inspections.
Deinstalling the Plugin for Swagger helps. I was not able to find a better solution which allows me to keep using the Swagger Plugin.
GitHub issue reporting this problem: https://github.com/zalando/intellij-swagger/issues/325
Fun fact: this error popped out as I was trying to code a coding challenge for Zalando, the company which developed the Swagger Plugin :D.
Check idea.log (Help > Show Log in Explorer) for plugin exceptions and update / disable / reinstall the faulty plugin.
If by any chance, someone stumbles upon this answer and is developing with Ktor (with plugin), there's currently an issue that does the same thing as in asked question.
If your route method name and route path are the same - the IDE analyzer stops (issue link).
...
fun Route.redirect() { // <-- same word (redirect) = BAD
route("/redirect") { // <-- same word (redirect) = BAD
...
While the bug is being solved, you can just rename the route as a solution.

IntelliJ issues error for 'false' value in yaml

Whenever in .yml file that I have a false property value I am getting a inspection error from IntelliJ. This happened only recently, I am using IntelliJ 2019.3.5
Invalid value 'false', must be one of off|on|true|true
Inspection info: Checks Spring Boot application .yaml configuration files. Highlights unresolved and deprecated configuration keys and invalid values.
The application runs fine but I'd like to know what causes this and if I should turn the inspection off.
Please always try the latest available product version before reporting bugs.
The issue seems to be fixed and not reproducible in the current IDE release.
The better place to report IntelliJ IDEA bugs would be YouTrack.

Problem building project in IntelliJ 2020.1

I'm trying to build my project but I can't.
I get this error:
Error:Cannot run program "C:\tools\jdk8.0.191\bin\java.exe" (in directory "C:\Users\"my user"\AppData\Local\JetBrains\IntelliJIdea2020.1\compile-server"): Malformed argument has embedded quote: -Djava.endorsed.dirs=\"\"
Do anyone know what to do about this? Iøm trying to build in IntelliJ 2020.1
Best Regards
It might be related to more strict command-line processing in JDK on Windows after JDK-8221858 (private) security patch see this comment for details.
Try following workaround: Help -> Edit Custom VM Options action and add the following line at the bottom of the file: -Djdk.lang.Process.allowAmbiguousCommands=true and restart IDE.

Using #Slf4j Annotation from lombok, but still have error that method log is unknown

I have a very strange behaviour of Intellij.
I had a single project before, I converted it to a multi module pom and everything seemd to work.
But now I see in my sourcecode the error, that the method log is undefined in spite of the fact that I have annotated the class with #Slf4j from lombok.
And the strange thing is, that I'm able to compile and run the project and I see all the log messages. but I still see this error shown in IntelliJ.
Look at my screenshot:
enter image description here
hmm, no unfortunatly deleting the cashes doesn't solve the problem.
But I finally solved it.
I have done two things (so I dont know if both were required ^^):
I activated the "enable the annotation processing"
I installed the Lombok Plug in and activated all options (Builder Support and so on

intellij IDEA - Edit Configuration

I installed IntelliJ IDEA with Java10.
I am having troubles with the build and run. I am being asked to edit the configuration.
I have specified the JDK 10 in the module settings. Is that a bug ?
And, I get this error when I try to compile with a random configuration setting.
Error: Could not find or load main class
Caused by: java.lang.ClassNotFoundException:
this part is really confusing and not really user-friendly and well documented by JetBrain I find
Right mouse click on the code window and select Run Your_file_name.kt
It will show you the green button to run the script instantly like below screenshot. click on that button.