robotframework-jupyterlibrary icon indicating copy to clipboard operation
robotframework-jupyterlibrary copied to clipboard

keywords for working with multiple open notebook tabs

Open bdattoma opened this issue 3 years ago • 1 comments

Signed-off by Berto D'Attoma: [email protected]

Hi, the following PR wants to propose some keywords to work where there are more than one notebook file opened in JupyterLab. Without these, there were issues trying to get cell outputs with the already present keywords.

implemented keywords

The keywords are:

  1. Wait Until a Given JupyterLab Code Cell Is Not Active In a Given Tab - it waits until the [*] symbol disappear (so the cell finished to run) - renamed to Wait Until JupyterLab Code Cell Is Idle. It works fine in Jupyter v3 and v2.
  2. Get A JupyterLab Code Cell Output In a Given Tab - it returns the output of the cell.
  3. Select Tab By Name - it selects an open tab (notebook file). Renamed to Select JupyterLab Dock Panel Tab By FilePath. It works fine in Jupyter v3, v2 and v1
  4. Get Selected Tab ID - it returns the tab id of the selected one (e.g., tab-key-0). Renamed to Get Selected JupyterLab Dock Panel Tab. It works fine in Jupyter v3 and v2

compatibility with Jupyter v1

The main issue is that in v1 we don't have the id attribute on the "tab" element. I can investigate a way to achieve the same result of keyword 1 and 2 without using the tab id (e.g., by targeting the tab by filepath, like done in keyword 3)

bdattoma avatar Dec 22 '21 09:12 bdattoma

The force pushing makes it hard to track comments over time.

Generally, these are looking okay, but need representative acceptance tests added.

bollwyvl avatar Jan 10 '22 14:01 bollwyvl