mtrubs / intellibot

IntelliJ/PyCharm plugin for Robot Automation Framework
https://github.com/millennialmedia/intellibot/wiki
MIT License
158 stars 109 forks source link

Latest version is not compatible with SeleniumLibrary 4.0.0 or higher #223

Open zastress opened 4 years ago

zastress commented 4 years ago

Intellibot@SeleniumLibrayPached is no longer compatible with latest SeleniumLibrary (above 4.0.0). Plugin crashes at Pycharm startup

zastress commented 4 years ago

Closed by mistake

ghost commented 4 years ago

Here is the error log for the plugin when it crashes...

java.lang.ClassCastException: class com.intellij.psi.impl.file.PsiDirectoryImpl cannot be cast to class com.jetbrains.python.psi.PyFile (com.intellij.psi.impl.file.PsiDirectoryImpl and com.jetbrains.python.psi.PyFile are in unnamed module of loader com.intellij.util.lang.UrlClassLoader @3159c4b8) at com.millennialmedia.intellibot.psi.element.HeadingImpl.findChildrenClass(HeadingImpl.java:441) at com.millennialmedia.intellibot.psi.element.HeadingImpl.collectImportFiles(HeadingImpl.java:386) at com.millennialmedia.intellibot.psi.element.HeadingImpl.getImportedFiles(HeadingImpl.java:349) at com.millennialmedia.intellibot.psi.element.RobotFileImpl.getImportedFiles(RobotFileImpl.java:84) at com.millennialmedia.intellibot.psi.ref.ResolverUtils.resolveKeywordFromFile(ResolverUtils.java:38) at com.millennialmedia.intellibot.psi.ref.RobotKeywordReference.resolve(RobotKeywordReference.java:28) at com.intellij.codeInsight.TargetElementUtil.doGetReferenceOrReferencedElement(TargetElementUtil.java:385) at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:363) at com.intellij.codeInsight.TargetElementUtil.doFindTargetElement(TargetElementUtil.java:235) at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:207) at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:82) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

lte2000 commented 4 years ago

Maybe you can try https://github.com/lte2000/intellibot I use PyCharm 2019.1.3, and robotframework-seleniumlibrary 4.1.0, no exception on a basic test. C:\Python36\Scripts>pip show robotframework-seleniumlibrary Name: robotframework-seleniumlibrary Version: 4.1.0 Summary: Web testing library for Robot Framework Home-page: https://github.com/robotframework/SeleniumLibrary Author: Tatu Aalto Author-email: aalto.tatu@gmail.com License: Apache License 2.0 Location: c:\python36\lib\site-packages Requires: robotframework, selenium Required-by:

zastress commented 4 years ago

Ok, thanks. I will give it a try

zastress commented 4 years ago

@lte2000 I installed it on Pycharm 2019.2.3 and there is no more crash, indeed. The problem is though that the commands from SeleniumLibrary 4.1.0 are not recognized by the plugin (CTRL+click on acommand does not do enything and all SeleniumLibrary commands are underlined with red color). 2019-11-11_1232

lte2000 commented 4 years ago

@lte2000 I installed it on Pycharm 2019.2.3 and there is no more crash, indeed. The problem is though that the commands from SeleniumLibrary 4.1.0 are not recognized by the plugin (CTRL+click on acommand does not do enything and all SeleniumLibrary commands are underlined with red color). 2019-11-11_1232

@zastress Have you selected the option in: Settings -> Languages & Frameworks -> Robot Options -> "Search Keywords in Sub-packages (e.g. SeleniumLibrary)"? The default is off. See my screenshot for the effect of CTRL+

Annotation 2019-11-11 211141
zastress commented 4 years ago

@lte2000, that worked. Thanks for the precious info :)

zastress commented 4 years ago

@lte2000, can you enable the "Issues" section inside your project for intellibot? There are some regressions that were observed and other problems that might be easier to fix if declared. Thanks.

lte2000 commented 4 years ago

@lte2000, can you enable the "Issues" section inside your project for intellibot? There are some regressions that were observed and other problems that might be easier to fix if declared. Thanks.

@zastress Enabled. The latest version is dev-0.10.143.384. Some features are enhanced, some bugs and exceptions are fixed.

RomanTatar-solar commented 4 years ago

Can you please fix the "IntelliBot @SeleniumLibrary Patched"?

sharikavishak commented 4 years ago

Maybe you can try https://github.com/lte2000/intellibot I use PyCharm 2019.1.3, and robotframework-seleniumlibrary 4.1.0, no exception on a basic test. C:\Python36\Scripts>pip show robotframework-seleniumlibrary Name: robotframework-seleniumlibrary Version: 4.1.0 Summary: Web testing library for Robot Framework Home-page: https://github.com/robotframework/SeleniumLibrary Author: Tatu Aalto Author-email: aalto.tatu@gmail.com License: Apache License 2.0 Location: c:\python36\lib\site-packages Requires: robotframework, selenium Required-by:

@lte2000 I installed it on Pycharm 2019.2.3 and there is no more crash, indeed. The problem is though that the commands from SeleniumLibrary 4.1.0 are not recognized by the plugin (CTRL+click on acommand does not do enything and all SeleniumLibrary commands are underlined with red color). 2019-11-11_1232

@zastress Have you selected the option in: Settings -> Languages & Frameworks -> Robot Options -> "Search Keywords in Sub-packages (e.g. SeleniumLibrary)"? The default is off. See my screenshot for the effect of CTRL+

I was facing the same issue and this worked for me too. Thanks a lot !!

zastress commented 4 years ago

Yep, got it working. Thanks,

frankvanderkuur commented 4 years ago

The lte2000 fork fixed the problem for me asvwell, thanks!

RomanTatar-solar commented 4 years ago

lte2000 fork works with PyCharm 2020.1.2 + Python 3.8 + robotframework-seleniumlibrary 4.4.0