Five newbie questions (identifying locators, VS Code extensions, best practices, pipeline integration)

Hi Ismar,

My first tip would be to create seperate posts for unrelated questions, simply because people who have the knowledge to answer one question may not know anything about another. It’s not a requirement to do this, just more likely you’ll get better answers.

I’ll try my best to answer to give you some answers:

[Q01] (part a) I don’t believe there is a “practice for identifying locators”, there are several methods supported, and all supported methods are acceptable in the RF community. RF seems to be about providing flexibility and does a good job at this.

You may want to set a standard for consistency for your company, but in doing this you may end up limiting yourselves, so I would suggest you set your standard to prioritise the order the selector type is chosen rather than limit to one type.

[Q01] (part b) + [Q02] There is no formal or central “recorder” type tool for Robot Framework, but in the documentation for some libraries there will be mention of tools that might help (flaui Library is a good example).
Also there are some chrome extensions that record .robot files for Selenium Library, I’ve used Robotcorder (source) before and it was quite good but hasn’t been maintained for a while, there’s a fork here Robocorp Recorder, and also there’s another similar tool Chrome Robot but i’ve not tried either of them.
You might also find something similar to record .robot files for Browser Library, i’ve not seen one but haven’t really looked either.

[Q03] Official VS Code extension? no and there probably won’t be. Again with the flexibility, you are free to choose any editor or IDE you want, rather than being limited to the editor that’s preferred by the developer. Those extensions are developed by people who use VS Code and Robot Framework, so I would argue that they are probably better supported than if the RF developers had to maintain Official extensions for every editor and every library. I don’t know much about it but saw some mentions in this forum of a language standard that the Libraries help files and syntax highlighting / code completion tools use so the extensions can still handle RF libraries that the extension was never tested with.
I don’t use VS Code myself, but hopefully that answers your question.

[Q04] The ability to create a test structure of keyword libraries is part of the fundamental core of Robot Framework, so all Robot Framework Libraries (including Browser Library) have this ability. I gave what I believe was a good generic example on how you can do this in the link below:

[Q05] My understanding of this, i’ve not done this with Gitlab, but with Github which is similar.

  1. check your .robot file/library of tests and keywords into git (you probably already did this?)
  2. choose / setup a template machine with the required Robot Framework Libraries and dependancies. I know there are docker templates like this you could use but if you want a different type of image search and see if someone already built one you can use
  3. configure you pipeline to launch a vm/container using the template and run the robot framework test case. Configure Gitlab to run on check in, merge or whatever trigger you want to use. You’ll need to refer to Gitlab documentation or some online tutorials for this bit)

Then simply make a small change (add a space, tab or comment) and check it in to trigger the pipeline workflow and check it works as you expected.

Hopefully those answers will guide you in the right direction,

Dave.