amailp / robot-plugin Goto Github PK
View Code? Open in Web Editor NEWRobot Framework support plugin for IntelliJ Idea
License: Other
Robot Framework support plugin for IntelliJ Idea
License: Other
I am on pycharm community edition. I loaded a robot project. Initially I was able to jump to function declarations and back. It stopped working after sometime
I'd like to be able to navigate through the keywords definitions when using [Template].
more info: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-templates
As of [1], the robotframework
supports RST-formatted text to be mixed with robot instructions.
The screenshot shows a linting error so I assume that is not implemented in the plugin.
[1] http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#id460
Hi,
Follow the below steps to reproduce the issue
testlibrary.py
from robot.api.deco import keyword
@Keyword(name="Login to Server ${ip}")
def server_perform_login(ip):
print("The IP Address provided is %s" %ip)
After importing the above library, keyword with the name "Login to Server" is not shown during the auto suggest of keywords.
Hi,
Follow the below steps in order to reproduce the issue.
I was not able to go to the source python file and keywords present in selenium2library were not shown.
The same problem is seen even with the user defined library also.
Let me know if you require any more info in this regard.
When a definition contains embedded variables surrounded by quotes, for example:
When user enters "${value}" in the detail field
Input Text detail ${value}
jumping to definitions stops working and raises an exception while trying to find the appropriate keyword to jump to.
Exception shown in the Event Log:
PatternSyntaxException
Illegal repetition near index 22
(?i)When user enters "${value}" in the detail field
^: Illegal repetition near index 22
(?i)When user enters "${value}" in the detail field
^
Please add opportunity to jump to keyword definition from [Template] line.
My Keyword is called
GIVEN A Valid ${ipAddress} for ${city}
When I try to jump to this with CMD+B I get error:
9:33 AM PatternSyntaxException
Illegal repetition near index 14
given_a_valid_${ipaddress}_for_${city}
^
When i try to build the project v0.16.2 using 'gradlew build', i get the error:
Execution failed for task ':compileScala'.
Could not find tools.jar
See the complete build log: build.txt
Examle:
We have:
"common_keywords.robot" filth keywords.
and Test Suite file:
*** Settings ***
Resource c-commerce-api/common_keywords.robot
*** Test Cases ***
Test_Action_Get_ByActionId
generate random id
${actionId} = generate random id
When we try to go to generate random id declaration in line "generate random id" it works fine, but we cand do in line:
" ${actionId} = generate random id"
As a robot framework plugin user I want to be able to "code complete" with keywords coming from the libraries declared in the file and in the included resources.
plugins report error on the following:
| *** Settings *** |
| Documentation | This is a robot framework test suite for xxxx. |
NOTE: because pipe format is more explicit and clear, so i prefer it.
Question: Does intellibot support remote library documentation? xml files?
This below is a menotioned robot code
AUS-435 Verify Download Report
[Tags] CRITICAL
----
${report_file_name}= download report ${report_format_xlsx} ${report_definition_id}
---
and downloadreport is defined in another class and method of class is
def download_report(self, report_format, report_definition_id=None):
---
---
return report_file_name
when i try to click on download report in robot file it says Cannot find declaration to go to
Hi,
Follow the below steps in order to reproduce the issue.
Download the latest version of pycharm professional edition from the jetbrains website.
Install both robot framework support(0.16.3) and Intellibot(0.10) plugins.
Restart pycharm
Looks likerobot-plugin does not work on pycharm 2017.2 professional when i reopen my project .
The screenshots are shown
https://drive.google.com/open?id=0B30IWlfzkwLlVnpOOXUtU1dyVjA
https://drive.google.com/open?id=0B30IWlfzkwLlZkJGYWx0bjBNS3c
With the following question like #41
Resources are not working if path contains ${CURDIR} or ${EXECDIR}.
Is it possible to add functionality to try resolve these variables or get some configuration panel to set. With ${CURDIR} should be difficult, ${EXECDIR} could be root folder in the project or configured somewhere statically.
I'm using pycharm+robot frame+this plugin for web developing,
I import Selenium2Library, but I can't get get Selenium2Library keyword reference while typing in testcases context. Note: I can get the keyword reference from an import resource file.
Is this a bug or should I install another plugin from JetBrains? I'm not quite sure the requirement marked with *
Code completion support:
User defined keywords from .robot files
User defined keywords from Static Python libraries []
Robot Library keywords []
[*] requires PyCharm or Python plugin from JetBrains
pycharm community edition 2017.2.3 can not code completion .any one of keyword can not hit.
In the example below I would expect to see the words "Given", "When", "And", "Then" to be displayed in different color:
*** Test Case ***
Empty login
Given User is on login page
When User types in credentials
And User submits login dialog
Then User should remain on login page
And Error message should be displayed
*** Keywords ***
User is on login page
...
User types in credentials
...
User submits login dialog
...
User should remain on login page
...
Error message should be displayed
...
Hello, I can't go to keyword definition when keyword is defined inside java-library (as a method with annotation). Does this behavior supported by the plugin?
Robot framework supports include files from working directory. For example we have the file structure
-robot
-folder1 [FILE.txt]
-folder2 [DEPENDENCIES.txt]
in FILE.txt I want to include DEPENDENCIES.txt, I should be able to do it next way:
Resource folder2/DEPENDENCIES.txt
Current implementation of the plugin does not resolve this dependency.
Same is for Libraries and Variables.
Can you add suport for this?
While I know the title is probably confusing, what I mean is that suppose we have an import like this:
Resource ../environment.robot
Resource ${RESOURCES}/variables/metadata.robot
Keywords or variables from metadata.robot can be followed by hitting F4. Likewise, following those variable declarations like ${RESOURCES} where it's defined in environment.robot would be desired.
Currently, only keywords where we're directly given a path to the resource can be followed with F4.
I am completly missing tutorial how to install this plugin in README.md file.
Hi!
I have a resource file keywords.robot and a module calc.py with a class which contains the implementation of my keywords (code snippets below). And I would like to be able to jump from verify hostname
in keywords.robot to def verify hostname(self):
in calc.py. In my case this is not possible. Is it not supported to do that or does it have something to do with how I import the implementation as a library?
calc.py module:
class Calculator(BaseLogger):
def verify_hostname(self):
privateLog("VERIFY HOSTNAME")
keywords.robot:
*** Settings ***
Library calc.Calculator WITH NAME Calculator
*** Keywords ***
Hostname Überprüfen
verify hostname
As one can see in the screenshot below when I start typing verify
(in the keywords.robot file) code completion works and shows me some definitions from Calculator class of calc.py module (calc.Calculator
) - so it knows where the difinition comes from:
BUT when I hold CTRL + mouseover over the keyword verify hostname
it tells that it cannot find the declaration:
(I´m using IntelliJ IDEA 14.0.3 Community Edition.)
Sometimes, keywords from installed Python libraries (e.g. selenium2library, BuiltIn, etc.) stop displaying in the auto-complete menu in PyCharm. User defined keywords continue to display in the auto-complete menu. I've been able to get the keywords to display again by "refreshing" the Python instance in PyCharm with these steps:
I've noticed that PyCharm shows a Null Pointer Exception coming from the plug-in regarding the auto-complete, but I can't tell if it is related to the library keywords not displaying. Here's the exception from PyCharm:
java.lang.NullPointerException
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1.librariesInScope$1(RobotLibrariesCompletionContributor.scala:44)
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1.addCompletions(RobotLibrariesCompletionContributor.scala:37)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:135)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:128)
at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:112)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:796)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.access$1000(CompletionProgressIndicator.java:90)
at com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:778)
at com.intellij.codeInsight.completion.AsyncCompletion$1$1$1.run(CompletionThreading.java:93)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:872)
at com.intellij.codeInsight.completion.AsyncCompletion$1$1.run(CompletionThreading.java:88)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at com.intellij.codeInsight.completion.AsyncCompletion$1.run(CompletionThreading.java:84)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:400)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
I'm running Mac OS X 10.10.4, Java 1.7.0_75-b13, PyCharm 4.5.3, Python 2.7.6.
The Python Robot Framework libraries I have installed are:
robotframework (2.8.6)
robotframework-appiumlibrary (1.2.3)
robotframework-databaselibrary (0.6)
robotframework-selenium2library (1.5.0)
this will be more clear at a glance when reading the .robot code.
When trying to do auto-completion in 2016.2.2, an error is logged and the completion does not happen. Using v0.12 of the plugin.
NoSuchMethodError: com.jetbrains.python.psi.PyClass.getMethods(Z)[Lcom/jetbrains/python/psi/PyFunction;
This may very well be a problem in PyCharm.
I downgraded to PyCharm 5.4 and its working now.
It seems that the plugin renders list variables wrong. In value assignments (e.g. @{list}= Create List A B C
) the list variable is rendered like a keyword. As a keyword argument the list variable is rendered like a literal. In both situation I would expect list variables being rendered like scalar variables.
RobotFramework = 3.0.2, robotframework-seleniumlibrary = 3.0.0.b3
I am using plugin version 0.12 with Pycharm and would very much like to be able to reference libraries using custom names. At this moment plugin fails to recognize a keyword as correct for such library:
Other than that the plugin is great! Thanks, @AmailP!
Currently the keywords and test cases all comes in small case, the preferred way in Robot is first alphabet of word as capital. Can you please support Auto capitalize, so it follows more on Robot standards.
i.e. for a keyword
Current:
should be empty
Proposed:
Should Be Empty
I keep getting this error
NoSuchMethodError: com.jetbrains.python.psi.PyClass.getAncestorClasses()Ljava/util/List;
com.jetbrains.python.psi.PyClass.getAncestorClasses()Ljava/util/List;
java.lang.NoSuchMethodError: com.jetbrains.python.psi.PyClass.getAncestorClasses()Ljava/util/List;
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1.lookupElementsFromMethods$1(RobotLibrariesCompletionContributor.scala:113)
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1.amailp$intellij$robot$extensions$RobotLibrariesCompletionContributor$$anon$$lookupElementsForLibrary$1(RobotLibrariesCompletionContributor.scala:99)
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1$$anonfun$addCompletions$2.apply(RobotLibrariesCompletionContributor.scala:39)
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1$$anonfun$addCompletions$2.apply(RobotLibrariesCompletionContributor.scala:38)
at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:728)
at scala.collection.immutable.List.foreach(List.scala:383)
at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:727)
at amailp.intellij.robot.extensions.RobotLibrariesCompletionContributor$$anon$1.addCompletions(RobotLibrariesCompletionContributor.scala:38)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:135)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:128)
at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:110)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:843)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.access$1000(CompletionProgressIndicator.java:93)
at com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:825)
at com.intellij.codeInsight.completion.AsyncCompletion$1$1$1.run(CompletionThreading.java:94)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:943)
at com.intellij.codeInsight.completion.AsyncCompletion$1$1.run(CompletionThreading.java:89)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.codeInsight.completion.AsyncCompletion$1.run(CompletionThreading.java:85)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
I'd be great to get the auto-completion for pycharm to see what kind of keywords are available in the test. The help message with signature and documentation will be useful as well.
install the plugin in pycharm , return an error
plugin 'Robot Framework Support' is incompatible with this installation
I would like to have variables that I am using in a file (from either within the file, from Resources, or from variable files) autocomplete like the keywords do.
This is the only feature I am missing with an editor. Others (Robot Plugin) have the variable completion, but not the static python library keyword autocompletion.
How does one add the existing robot and user created keywords such that auto-complete works inside PyCharm? This comment on plugin wiki seems related but cannot figure out what exactly needs to be done: "Please make sure that python classes are reference only via paths reachable from classes defined in the Python dedicated plugin descriptor (META-INF/robot-python.xml)"
Further, it will be very useful if there is a remote ssh option to get the robot keywords since we have a set of users who use a common robot/python server and do not want to keep local copies of many things, but want to develop a few things locally and test/execute via pycharm terminal on the remote server. So for development work, auto-complete and such features will be useful, if can be remotely fetched.
OS: MacOS 10.12.2
PyCharm: 2016.2.3
Robot Framework support plugin: 0.16.1
It will take more than 15 seconds to show context menu for a robot source. Other languages such as Python works well.
I am a newbie on using Pycharm.
Could you please show me how I can install this plugin to Pycharm?
Thank you very much!
Hi, I installed your plugin into RubyMine 6.3 expecting to get Python text highlighting, but nothing changed (all the Python test is still black).
Is this not the intent of the plugin, or if so, what do I need to configure for Python highlights?
Thanks,
Martin
First of all thank you for awesome plugin :)
I have a feature request:
Auto completion for keywords implemented with Java and included in test project as dependecy. It would be awesome if auto-completion would work just by including a new test library..
..this is solved on some plugins for other IDEs: list of keywords in .index file (as used in Eclipse robot plugin) or getting keywords from a Java spec file (RIDE development environment uses this approach https://github.com/robotframework/RIDE/wiki/Keyword-Completion#using-library-specs)
the plugin reports error for the following (template syntax): (1 + 1 is not kerword ....)
and by the way, it can not detect keywords from imported lib (error reported again)
errors everywhere ....
looking forward to new version fixed all these unexpected errors.
thanks!
*** Test Cases *** Normal test case with embedded arguments The result of 1 + 1 should be 2 The result of 1 + 2 should be 3 Template with embedded arguments [Template] The result of ${calculation} should be ${expected} 1 + 1 2 1 + 2 3 *** Keywords *** The result of ${calculation} should be ${expected} ${result} = Calculate ${calculation} Should Be Equal ${result} ${expected}
Getting a null pointer exception using the plugin with using PyCharm 2016.1.4
null
java.lang.NullPointerException
at amailp.intellij.robot.psi.VariableDefinition.getName(VariableDefinition.scala:13)
at com.intellij.psi.impl.search.CachesBasedRefSearcher.processQuery(CachesBasedRefSearcher.java:43)
at com.intellij.psi.impl.search.CachesBasedRefSearcher.processQuery(CachesBasedRefSearcher.java:21)
at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:79)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:45)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:75)
at com.intellij.util.MergeQuery.processSubQuery(MergeQuery.java:84)
at com.intellij.util.MergeQuery.forEach(MergeQuery.java:56)
at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
at com.intellij.util.UniqueResultsQuery.findAll(UniqueResultsQuery.java:78)
at com.intellij.find.findUsages.FindUsagesHandler.findReferencesToHighlight(FindUsagesHandler.java:174)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.a(IdentifierHighlighterPass.java:156)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getHighlightUsages(IdentifierHighlighterPass.java:133)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.a(IdentifierHighlighterPass.java:189)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:106)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1178)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.