Hi there
In my team we were exploring various test automation tools and ended up trying out Playwright and Robot Framework Browser Library (RFB). We decided to go with the latter. Since I was the one exploring Playwright and my colleague did RFB, I’m now learning RFB myself.
Coming from Playwright and its VS Code extension, one immediate question arose for me:
[Q01] What’s the best practice for identifying locators when working with RFB? With the Playwright VS Code code extension, in the testing tab, I can hit the Record new button, a browser launches in element selection mode and I can simply click, type etc. while perfectly valid Playwright Typescript code is recorded in my new test file. It’s an extremely smooth process. A logical workaround is using the Playwright extension’s “Pick locator” feature and then copy-pasting into my .robot file but that quite hacky.
[Q02] Does RFB have anything like this? The section titled “Finding Elements” in the docs mentions nothing of the sort.
[Q03] Is there an official RFB VS Code extension?
I found these two and am playing with both to see what’s most helpful. It seems there’s a lot of overlap in functionality between the two:
- Name: Robot Code
Id: d-biehl.robotcode
Description: RobotFramework support for Visual Studio Code
Version: 0.24.0
Publisher: Daniel Biehl
VS Marketplace Link: Robot Code - Visual Studio Marketplace - Name: Robot Framework Language Server
Id: robocorp.robotframework-lsp
Description: VSCode extension support for Robot Framework
Version: 1.7.7
Publisher: Robocorp
VS Marketplace Link: Robot Framework Language Server - Visual Studio Marketplace
I like the idea of the keywords.resource file to make the file containing the test cases even cleaner to read. [Q04] Can RBF be configured to optimise test suite structure, such as actually creating a keywords.resource file and putting the whole *** Keywords *** section in case that’s present in my .robot file?
[Q05] Much more importantly, once I get the hang of this on my Mac, what’s the easiest way to get this truly automated in, say, a Gitlab pipeline? Asked differently, what needs to happen for my local test code to successfully execute in a Gitlab pipeline?
Thanks for reading this far and have a fantastic day!