Printing in Robocode Lab

Starting from 2.3.0 of RPA Framework, there is a RPA.core.notebook package which can be used especially in the Robocode Lab notebook edit mode to print text, links, images, tables, videos and audio to the notebook output.

Main benefit of this feature is that keyword related output is easily viewable in the notebook and you don’t need to go to log.html to check output from the keyword.

Notebook package is already included in some of the RPA base libraries (like in Tables and Browser) which will automatically print extra output in notebook mode, but package can also be used separately in the notebook.

example.robot

*** Settings ***
Library   RPA.core.notebook
Library   RPA.FileSystem
Library   RPA.Tables

*** Keywords ***
List content
    ${files}=        List files in directory    ${CURDIR}
    Notebook Print   text=${files}
    ${tab}=          Create table    ${files} 

Printing Keyword
    Notebook Print  text for the output  link=https://www.google.fi
    Notebook File   downloaded.zip
    Notebook Dir    .
    Notebook JSON   items.json
    Notebook Image  example.png
    Notebook Video  rpa_challenge.mkv
    Notebook Audio  ./../temp/synthesized.mp3

Comments, bug reports and improved ideas are really appreciated.

5 Likes