Announcing a new Robot editor for Eclipse

465 views
Skip to first unread message

Scott Paxton

unread,
Aug 4, 2015, 2:41:56 AM8/4/15
to robotframework-users
Presenting a new option for Eclipse users seeking a Robot editor: the "Pyro" project was originally developed as an in-house testing tool and is now being open-sourced.  In addition to being a general Robot test editor its primary focus is on additional Python capabilities for working with both user-authored and built-in keyword libraries, including jump-to-source and content-assist features.  Python awareness was achieved via integration with the popular PyDev plugins for Eclipse.

See more and try it out at:

mr

unread,
Aug 5, 2015, 4:59:28 AM8/5/15
to robotframework-users
That's interesting news.

Currently I'm using the RIDE [1] as editor. What are the advantages and disadvantages if you compare Pyro with RIDE?

WarBar

unread,
Aug 5, 2015, 5:13:59 AM8/5/15
to robotframework-users
I am trying to test your Solution.
I can see robot file in "Robot Framework Editor", but there is no
* autocomplete function for keyword
* Variable checking
is it correct ?
Can you put some screenshots/ short presentation on youtube how it looks when everything works correctly.

Jyrki Lindroos

unread,
Aug 5, 2015, 8:11:11 AM8/5/15
to robotframework-users

Hello Scott,

This editor looks really promising and I actually started using it as my default Robot editor. There was some functionality that I would like to be different and even some problems, though:

  • The content assist would always add library keywords with all-lowercase letters. What I would prefer is that all the words would start with capital letter.
  • For me it didn’t seem to find any keywords for resource/library files that were loaded through another resource file (i.e. not directly from the file they were used).
  • I seemed to have many resource files from which it could not find any keywords to show (even when loaded directly from the file).

o   One problem was that a resource file contains a keyword which has a dot character in its name. This prevented all keywords after that (in alphabetical order) showing up and it just happened to be the first keyword when ordered.

o   Another problem seems to be that when loading resource files the files names are case sensitive. We are developing in Windows so there Robot doesn’t require this.

  • Did not show any dropdown when line was started with a $-sign (line included the two or more spaces i.e. was indented, that seems to be need for the dropdown to show anything).  With $-sign it would be nice to see the variables list for assignment operation.

Scott Paxton

unread,
Aug 5, 2015, 9:23:29 PM8/5/15
to robotframework-users
Thanks for the interest.  Taking the last point first, I do intend to add some additional screenshots/documentation soon, so stay tuned.

There is content assist (autocomplete) for keywords, as long as the editor can follow either relative file paths or PYTHONPATH entries to find the source of your keyword.  The easiest test is of course locally-defined keywords within the same Robot file.  Try pressing Ctrl-Space or Cmd-Space (depending on platform) from a position where you can make a keyword invocation (ex. inside a testcase or another keyword) to see keywords the editor thinks are reachable from that point.  Hyperlinking to jump to the source of a keyword is similar: hold down Ctrl or Cmd and mouse-over a keyword call.

As far as "variable checking", if you mean source validation then no I haven't added any yet.  There are calculations in the content assist code to present only variables that are potentially in scope where it is being used, so it may be possible to reuse this for validation in the future.

Scott Paxton

unread,
Aug 5, 2015, 9:40:10 PM8/5/15
to robotframework-users
Hi Jyrki,
Thanks, there are some good points here which I'll put into bugs soon.  The initial work on this editor was based around our in-house Robot test development and matches up a lot with our existing code styles.  For example, I knew it didn't chase down links included through other resources, simply because we are pretty explicit about importing all dependencies into each file that needs them.  But that's a good point to address.

Both the lowercasing and dot-in-keyword names also likely got tripped up on assumptions that came from our code conventions.  There's some logic that optionally tries to fully-qualify a keyword name like "path.to.library.my keyword name" if a dot shows up somewhere.  Case sensitivity is also a bit sneaky - if you start typing the first two words using uppercase characters then it will autocomplete with uppercase characters, but that's a really hidden function. These kinds of things may be better off as user preferences instead.

I'll create new issues for future work on some of these points below.  Feel free to add more of your own on the github page and thanks for following.

Scott Paxton

unread,
Aug 13, 2015, 12:50:33 AM8/13/15
to robotframework-users
Just following up on this earlier post to briefly mention new clearer "what is it and what does it do" documentation on the editor project wiki.  The wiki now contains more details about the project in general but the Editor Features page here may be most useful as an overview:   

https://github.com/millennialmedia/pyro/wiki/EditorFeatures

I've also pushed up a newer version in the Eclipse update site with enhancements to follow transitive resource/library imports via other resource files.  There is also a fix to relax case-sensitivity on Windows.  Work will be ongoing -  please feel free to open issues and continue discussion on the github project page.

Thanks,
Scott

jaf...@owler.com

unread,
Aug 15, 2015, 3:32:46 AM8/15/15
to robotframework-users
@All,

How about java keywords as we are using completely external java libraries like selenium2library and other custom libraries written in java.
Jumping to Java keywords is not possible currently and if that supported added in the plugin it would help the entire community who are using java libraries in robot framework.

Thanks & Regards
Jaffer

Prashant

unread,
Aug 17, 2015, 12:56:00 AM8/17/15
to robotframework-users
Hi Scott,
 
      The editor looks promising and I really liked it. Couple of things I observed, (I am using 1.0.1)

1. I can not hyperlink on resource file. Even though I added correct directory to PYTHONPATH. And with this I can not refer keywords or variables defined in resource file.
2. I can not hyperlink any external libraries like Selenium2Library. Although I observed hyperlinking for built-in libraries like Collections etc. work perfectly.
    In case of Selenium2Library, it is installed as pip package and available under C:\Python27\Lib\site-packages. The path C:\Python27\Lib\site-packages is already in PYTHONPATH with PyDev interpreter settings.

Thanks,
Prashant

Scott Paxton

unread,
Aug 17, 2015, 10:33:57 PM8/17/15
to robotframework-users
That's an interesting proposal to support Java keyword libraries. I had that in the back of my mind at one point and Pyro's extension points for hyperlinking and content assist are generic enough to support other library types.  I have some ideas how Java might be handled but it's probably a significant amount of work and since we use only Python in-house I'm very unfamiliar with Java keyword use-cases right now.  I've opened the following feature request in the project backlog:  https://github.com/millennialmedia/pyro/issues/14

If anybody is interested in seeing Java keyword support in Pyro, could you either comment in that github issue or email me directly about your interest?  For now I'm going to be focusing on some Python-related enhancements and fixes, but if I get a chance to get to this I will at least need some testing assistance for Java scenarios.  Even better, if anybody doing work with Java keywords has any experience or interest in Eclipse development, I can share some ideas on how to get started.

Thanks,
Scott

Scott Paxton

unread,
Aug 17, 2015, 10:41:40 PM8/17/15
to robotframework-users
Hi Prashant,

1) Can you send me an example scenario that's not working?  For resource files (at least files within the same project), I've had pretty consistent success with linking from "Resource [relative-path-to-robot-file]", where the relative-path was calculated against either the directory containing the current source file or any other directory on the PYTHONPATH.  I'm curious about your specific details that failed - personal email is fine and I'll open a bug if necessary.

2) I've opened a new issue on the github project for searching externaly-installed Python libs.  You're right that right now only Robot built-in libs are searched for underneath /site-packages (we use lots of other in-house Python libs, but all of them are in the test project instead of built and installed as external libs).  Selenium2Library specifically may have some additional quirks that need more work, but I can at least add some generic external-library-search support pretty easily.

Thanks,
Scott

Prashant

unread,
Aug 18, 2015, 2:51:18 AM8/18/15
to robotframework-users
Hi Scott,
  
         Sorry it was my mistake. I was referring resource file with .txt extension while the same was having .robot on file system.

For external library search, I think it should be generic search if package is under PYTHONPATH. All external libraries get installed under site-packages which is already under PYTHONPATH. Only Robot built-in libraries under robot.libraries

Thanks,
Prashant

Scott Paxton

unread,
Aug 30, 2015, 11:35:43 PM8/30/15
to robotframework-users
Just a quick note that the new version 1.0.2 of Pyro just went out on the update site.  This includes several more bug-fixes and features requested by early users (thanks for the feedback so far, and keep it coming).  See more at https://github.com/millennialmedia/pyro



On Tuesday, August 4, 2015 at 2:41:56 AM UTC-4, Scott Paxton wrote:

Prashant

unread,
Aug 31, 2015, 6:01:43 AM8/31/15
to robotframework-users
Thanks a lot.

Scott Paxton

unread,
Nov 11, 2015, 11:56:53 PM11/11/15
to robotframework-users
Just a quick followup that version 1.1 of the Pyro editor for Eclipse has been pushed out to the update site (see https://github.com/millennialmedia/pyro for info).  

Several people have asked me about Selenium2Library support and I'm happy to report that with recent enhancements to the PyDev integration code, hyperlinking and content assist are fully working for installed python keyword libraries like Selenium.  Content assist for variables defined in variable files are also supported in the latest updates, along with a bunch of other updates.

Tatu Aalto

unread,
Nov 12, 2015, 1:49:23 AM11/12/15
to spa...@millennialmedia.com, robotframework-users

Ugh

This looks cool and may force me to switch to Eclipse. I was reading the documentation and could not find a page which would list all the keyboard shortcuts. I did find a small section, which did say Ctrl + space would bring the content assistant up but that was it. I am not familiar with Eclipse/PyDev and I don't want to use mouse when I am working, so is it possible to:
1) See the keyword documentation, where the cursor is by pressing some keyboard combination?
2) Jump to the keyword (assuming that linking works), on which keyword the cursor is, by pressing some keyboard combination?
3) If the library is not a Python library, but it has the XML document generated, is it possible to read the keywords from the XML document?

If the keyboard shortcuts relies some standard Eclipse/PyDev keyboard combinations, could you point me to the right direction?

-Tatu
Send from my mobile

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages