From aac1cd4b43dbd03058a609f78062ceb03501f3d4 Mon Sep 17 00:00:00 2001 From: bdattoma Date: Tue, 21 Dec 2021 18:37:42 +0100 Subject: [PATCH 1/5] rebase --- .../clients/jupyterlab/Notebook.resource | 11 +++++ .../clients/jupyterlab/Output.resource | 11 +++++ .../clients/jupyterlab/Selectors.robot | 42 +++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 src/JupyterLibrary/clients/jupyterlab/Selectors.robot diff --git a/src/JupyterLibrary/clients/jupyterlab/Notebook.resource b/src/JupyterLibrary/clients/jupyterlab/Notebook.resource index a198159e..9b23d1f6 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Notebook.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Notebook.resource @@ -52,3 +52,14 @@ Run Current JupyterLab Code Cell ... ${nb.find_element_by_xpath('''div${JLAB XP NB TOOLBAR FRAG}//${run icon}''')} Click Element ${run btn} Sleep 0.5s + +Get Selected Tab ID + [Documentation] Return the tab ID of the selected notebook tab + ${active-nb-tab} = Get WebElement xpath:${JL_TABBAR_SELECTED_XPATH} + ${tab-id} = Get Element Attribute ${active-nb-tab} id + [Return] ${tab-id} + +Select Tab By Name + [Documentation] Select a notebook tab by filename + [Arguments] ${filename} + Click Element xpath:${JL_TABBAR_CONTENT_XPATH}/li/div[.="${filename}"] \ No newline at end of file diff --git a/src/JupyterLibrary/clients/jupyterlab/Output.resource b/src/JupyterLibrary/clients/jupyterlab/Output.resource index dff53aaa..a074a515 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Output.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Output.resource @@ -41,3 +41,14 @@ Screenshot Each Output Of Active JupyterLab Document Screenshot Each Output Of Active JupyterLab Cell ${prefix}_cell_${i} Screenshot Markdown Of Active JupyterLab Cell ${prefix}_cell_${i} END + +Wait Until a Given JupyterLab Code Cell Is Not Active In a Given Tab + [Documentation] Waits until the given cell in a specific JL tab no longer has an active prompt "[*]:". + [Arguments] ${tab_id_to_wait} ${cell_n} ${timeout}=120seconds + Wait Until Element Is Not Visible xpath=//div[@aria-labelledby="${tab_id_to_wait}"]/${NB TAB XP CONTENT}/div[${cell_n}]/${CELL XP INPUT STATUS ICON} ${timeout} + +Get A JupyterLab Code Cell Output In a Given Tab + [Documentation] It returns the output of a given cell in a specific JL tab + [Arguments] ${tab_id_to_read} ${cell_n} + ${outputtext}= Get Text xpath=//div[@aria-labelledby="${tab_id_to_read}"]/${NB TAB XP CONTENT}/div[${cell_n}]/${CELL XP OUTPUT TEXT} + [Return] ${outputtext} \ No newline at end of file diff --git a/src/JupyterLibrary/clients/jupyterlab/Selectors.robot b/src/JupyterLibrary/clients/jupyterlab/Selectors.robot new file mode 100644 index 00000000..19b02ccb --- /dev/null +++ b/src/JupyterLibrary/clients/jupyterlab/Selectors.robot @@ -0,0 +1,42 @@ +*** Variables *** +# css selectors +${JLAB CSS ACCEPT} .jp-mod-accept +${JLAB CSS ACTIVE DOC} .jp-Document:not(.jp-mod-hidden) +${JLAB CSS ACTIVE DOC CELLS} ${JLAB CSS ACTIVE DOC} .jp-Cell +${JLAB CSS ACTIVE CELL} ${JLAB CSS ACTIVE DOC} .jp-Cell.jp-mod-active +${JLAB CSS ACTIVE INPUT} ${JLAB CSS ACTIVE CELL} .CodeMirror +${JLAB CSS ACTIVE OUTPUT CHILDREN} ${JLAB CSS ACTIVE CELL} .jp-OutputArea-child +${JLAB CSS OUTPUT} .jp-OutputArea-output +${JLAB CSS ACTIVE CELL MARKDOWN} ${JLAB CSS ACTIVE CELL} .jp-MarkdownOutput:not(.jp-mod-hidden) +${JLAB CSS ACTIVE SIDEBAR} .jp-SideBar .p-TabBar-tab.p-mod-current +${JLAB CSS BUSY KERNEL} .jp-Toolbar-kernelStatus.jp-FilledCircleIcon +${JLAB CSS CMD INPUT} .p-CommandPalette-input +${JLAB CSS CMD ITEM} .p-CommandPalette-item +${JLAB CSS NB TOOLBAR} .jp-NotebookPanel-toolbar +${JLAB CSS SIDEBAR TAB} .jp-SideBar .p-TabBar-tab +${JLAB CSS SPINNER} .jp-Spinner +# magic ids +${JLAB ID SPLASH} jupyterlab-splash +# magic strings +${JLAB TEXT BUSY PROMPT} In [*]: +# xpath selectors +${JLAB XP LAUNCHER} //div[contains(@class, 'jp-Launcher-body')] +${JLAB XP CARD} //div[contains(@class, 'jp-LauncherCard')] +${JLAB XP DOCK} //div[@id='jp-main-dock-panel'] +${JLAB XP MENU ITEM LABEL} //div[contains(@class, 'p-Menu-itemLabel')] +${JLAB XP MENU LABEL} //div[contains(@class, 'p-MenuBar-itemLabel')] +${JLAB XP TOP} //div[@id='jp-top-panel'] +${JLAB XP MAIN AREA FRAG} [contains(@class, 'jp-MainAreaWidget')] +${JLAB XP NB FRAG} ${JLAB XP MAIN AREA FRAG}\[contains(@class, 'jp-NotebookPanel')] +${JLAB XP NB TOOLBAR FRAG} [contains(@class, 'jp-NotebookPanel-toolbar')] +${JLAB XP NB TOOLBAR} //div${JLAB XP NB TOOLBAR FRAG} +${JLAB XP BUSY KERNEL} //*[local-name() = 'div' and conttains(@class, 'jp-FilledCircleIcon' or (local-name() = 'svg' and contains(@data-icon, 'ui-components:circle-filled')))] +${CELL XP INPUT} div[contains(@class, p-Cell-inputWrapper)]/div[contains(@class,"jp-Cell-inputArea")] +${CELL XP INPUT STATUS ICON} ${CELL XP INPUT}/div[contains(@class,"jp-InputArea-prompt") and (.="[*]:")] +${CELL XP OUTPUT} div[contains(@class, jp-Cell-outputWrapper)]/div[contains(@class,"jp-Cell-outputArea")] +${CELL XP OUTPUT TEXT} ${CELL XP OUTPUT}//div[contains(@class,"jp-RenderedText")] +${NB TAB XP CONTENT} div[@aria-label="notebook content"] +## dock panel +${JLAB XP DOCK PANEL} //*[@id = 'jp-main-dock-panel'] +${JLAB XP DOCK TAB} ${JLAB XP DOCK PANEL}//ul[contains(@class, 'p-TabBar-content')]/li[contains(@class, 'p-TabBar-tab')] +${JLAB XP DOCK TAB LABEL} ${JLAB XP DOCK TAB}/div[contains(@class, 'p-TabBar-tabLabel')] From 367331c54257b2b3096b3486bdbc3aa25f44a63d Mon Sep 17 00:00:00 2001 From: bdattoma Date: Wed, 22 Dec 2021 10:14:54 +0100 Subject: [PATCH 2/5] some doc added Signed-off-by: bdattoma --- src/JupyterLibrary/clients/jupyterlab/Output.resource | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/JupyterLibrary/clients/jupyterlab/Output.resource b/src/JupyterLibrary/clients/jupyterlab/Output.resource index a074a515..ff4e79ae 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Output.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Output.resource @@ -44,11 +44,13 @@ Screenshot Each Output Of Active JupyterLab Document Wait Until a Given JupyterLab Code Cell Is Not Active In a Given Tab [Documentation] Waits until the given cell in a specific JL tab no longer has an active prompt "[*]:". + ... The cell index starts from 1 and you must count empty and markdown cells too. [Arguments] ${tab_id_to_wait} ${cell_n} ${timeout}=120seconds Wait Until Element Is Not Visible xpath=//div[@aria-labelledby="${tab_id_to_wait}"]/${NB TAB XP CONTENT}/div[${cell_n}]/${CELL XP INPUT STATUS ICON} ${timeout} Get A JupyterLab Code Cell Output In a Given Tab - [Documentation] It returns the output of a given cell in a specific JL tab + [Documentation] It returns the output of a given cell in a specific JL tab. + ... The cell index starts from 1 and you must count empty and markdown cells too. [Arguments] ${tab_id_to_read} ${cell_n} ${outputtext}= Get Text xpath=//div[@aria-labelledby="${tab_id_to_read}"]/${NB TAB XP CONTENT}/div[${cell_n}]/${CELL XP OUTPUT TEXT} [Return] ${outputtext} \ No newline at end of file From 51786674e9f9a8a454f1ef9e1ea2cd9bd26d0586 Mon Sep 17 00:00:00 2001 From: bdattoma Date: Mon, 3 Jan 2022 14:39:32 +0100 Subject: [PATCH 3/5] new jl selector refactoring Signed-off-by: bdattoma --- .../clients/jupyterlab/Notebook.resource | 4 +- .../clients/jupyterlab/Output.resource | 4 +- .../clients/jupyterlab/Selectors.resource | 11 ++++- .../clients/jupyterlab/Selectors.robot | 42 ------------------- 4 files changed, 14 insertions(+), 47 deletions(-) delete mode 100644 src/JupyterLibrary/clients/jupyterlab/Selectors.robot diff --git a/src/JupyterLibrary/clients/jupyterlab/Notebook.resource b/src/JupyterLibrary/clients/jupyterlab/Notebook.resource index 9b23d1f6..3ae624ba 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Notebook.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Notebook.resource @@ -55,11 +55,11 @@ Run Current JupyterLab Code Cell Get Selected Tab ID [Documentation] Return the tab ID of the selected notebook tab - ${active-nb-tab} = Get WebElement xpath:${JL_TABBAR_SELECTED_XPATH} + ${active-nb-tab} = Get WebElement xpath:${JLAB XP DOCK TAB SELECTED} ${tab-id} = Get Element Attribute ${active-nb-tab} id [Return] ${tab-id} Select Tab By Name [Documentation] Select a notebook tab by filename [Arguments] ${filename} - Click Element xpath:${JL_TABBAR_CONTENT_XPATH}/li/div[.="${filename}"] \ No newline at end of file + Click Element xpath:${JLAB XP DOCK TABBAR CONTENT}/li/div[.="${filename}"] \ No newline at end of file diff --git a/src/JupyterLibrary/clients/jupyterlab/Output.resource b/src/JupyterLibrary/clients/jupyterlab/Output.resource index ff4e79ae..ec939b2e 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Output.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Output.resource @@ -46,11 +46,11 @@ Wait Until a Given JupyterLab Code Cell Is Not Active In a Given Tab [Documentation] Waits until the given cell in a specific JL tab no longer has an active prompt "[*]:". ... The cell index starts from 1 and you must count empty and markdown cells too. [Arguments] ${tab_id_to_wait} ${cell_n} ${timeout}=120seconds - Wait Until Element Is Not Visible xpath=//div[@aria-labelledby="${tab_id_to_wait}"]/${NB TAB XP CONTENT}/div[${cell_n}]/${CELL XP INPUT STATUS ICON} ${timeout} + Wait Until Element Is Not Visible xpath=//div[@aria-labelledby="${tab_id_to_wait}"]/${JLAB XP NOTEBOOK CONTENT}/div[${cell_n}]/${JLAB XP CELL INPUT STATUS ICON} ${timeout} Get A JupyterLab Code Cell Output In a Given Tab [Documentation] It returns the output of a given cell in a specific JL tab. ... The cell index starts from 1 and you must count empty and markdown cells too. [Arguments] ${tab_id_to_read} ${cell_n} - ${outputtext}= Get Text xpath=//div[@aria-labelledby="${tab_id_to_read}"]/${NB TAB XP CONTENT}/div[${cell_n}]/${CELL XP OUTPUT TEXT} + ${outputtext}= Get Text xpath=//div[@aria-labelledby="${tab_id_to_read}"]/${JLAB XP NOTEBOOK CONTENT}/div[${cell_n}]/${JLAB XP CELL OUTPUT TEXT}} [Return] ${outputtext} \ No newline at end of file diff --git a/src/JupyterLibrary/clients/jupyterlab/Selectors.resource b/src/JupyterLibrary/clients/jupyterlab/Selectors.resource index 5d23f4de..9e2e3ea9 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Selectors.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Selectors.resource @@ -40,5 +40,14 @@ ${JLAB XP NB TOOLBAR} //div${JLAB XP NB TOOLBAR FRAG} ${JLAB XP BUSY KERNEL} //*[local-name() = 'div' and contains(@class, 'jp-FilledCircleIcon' or (local-name() = 'svg' and contains(@data-icon, 'ui-components:circle-filled')))] # dock panel ${JLAB XP DOCK PANEL} //*[@id = 'jp-main-dock-panel'] -${JLAB XP DOCK TAB} ${JLAB XP DOCK PANEL}//ul[contains(@class, 'p-TabBar-content')]/li[contains(@class, 'p-TabBar-tab')] +${JLAB XP DOCK TABBAR CONTENT} ${JLAB XP DOCK PANEL}//ul[contains(@class, 'p-TabBar-content')] +${JLAB XP DOCK TAB} ${JLAB XP DOCK TABBAR CONTENT}/li[contains(@class, 'p-TabBar-tab')] ${JLAB XP DOCK TAB LABEL} ${JLAB XP DOCK TAB}/div[contains(@class, 'p-TabBar-tabLabel')] +${JLAB XP DOCK TAB SELECTED} ${JLAB XP DOCK TABBAR CONTENT}/li[contains(@class,"lm-mod-current p-mod-current")] +# notebook +${JLAB XP CELL INPUT AREA} div[contains(@class, p-Cell-inputWrapper)]/div[contains(@class,"jp-Cell-inputArea")] +${JLAB XP CELL INPUT STATUS ICON} ${JLAB XP CELL INPUT AREA}/div[contains(@class,"jp-InputArea-prompt") and (.="[*]:")] +${JLAB XP CELL OUTPUT AREA} div[contains(@class, jp-Cell-outputWrapper)]/div[contains(@class,"jp-Cell-outputArea")] +${JLAB XP CELL OUTPUT TEXT} ${JLAB XP CELL OUTPUT AREA}//div[contains(@class,"jp-RenderedText")] +${JLAB XP NOTEBOOK CONTENT} div[@aria-label="notebook content"] + diff --git a/src/JupyterLibrary/clients/jupyterlab/Selectors.robot b/src/JupyterLibrary/clients/jupyterlab/Selectors.robot deleted file mode 100644 index 19b02ccb..00000000 --- a/src/JupyterLibrary/clients/jupyterlab/Selectors.robot +++ /dev/null @@ -1,42 +0,0 @@ -*** Variables *** -# css selectors -${JLAB CSS ACCEPT} .jp-mod-accept -${JLAB CSS ACTIVE DOC} .jp-Document:not(.jp-mod-hidden) -${JLAB CSS ACTIVE DOC CELLS} ${JLAB CSS ACTIVE DOC} .jp-Cell -${JLAB CSS ACTIVE CELL} ${JLAB CSS ACTIVE DOC} .jp-Cell.jp-mod-active -${JLAB CSS ACTIVE INPUT} ${JLAB CSS ACTIVE CELL} .CodeMirror -${JLAB CSS ACTIVE OUTPUT CHILDREN} ${JLAB CSS ACTIVE CELL} .jp-OutputArea-child -${JLAB CSS OUTPUT} .jp-OutputArea-output -${JLAB CSS ACTIVE CELL MARKDOWN} ${JLAB CSS ACTIVE CELL} .jp-MarkdownOutput:not(.jp-mod-hidden) -${JLAB CSS ACTIVE SIDEBAR} .jp-SideBar .p-TabBar-tab.p-mod-current -${JLAB CSS BUSY KERNEL} .jp-Toolbar-kernelStatus.jp-FilledCircleIcon -${JLAB CSS CMD INPUT} .p-CommandPalette-input -${JLAB CSS CMD ITEM} .p-CommandPalette-item -${JLAB CSS NB TOOLBAR} .jp-NotebookPanel-toolbar -${JLAB CSS SIDEBAR TAB} .jp-SideBar .p-TabBar-tab -${JLAB CSS SPINNER} .jp-Spinner -# magic ids -${JLAB ID SPLASH} jupyterlab-splash -# magic strings -${JLAB TEXT BUSY PROMPT} In [*]: -# xpath selectors -${JLAB XP LAUNCHER} //div[contains(@class, 'jp-Launcher-body')] -${JLAB XP CARD} //div[contains(@class, 'jp-LauncherCard')] -${JLAB XP DOCK} //div[@id='jp-main-dock-panel'] -${JLAB XP MENU ITEM LABEL} //div[contains(@class, 'p-Menu-itemLabel')] -${JLAB XP MENU LABEL} //div[contains(@class, 'p-MenuBar-itemLabel')] -${JLAB XP TOP} //div[@id='jp-top-panel'] -${JLAB XP MAIN AREA FRAG} [contains(@class, 'jp-MainAreaWidget')] -${JLAB XP NB FRAG} ${JLAB XP MAIN AREA FRAG}\[contains(@class, 'jp-NotebookPanel')] -${JLAB XP NB TOOLBAR FRAG} [contains(@class, 'jp-NotebookPanel-toolbar')] -${JLAB XP NB TOOLBAR} //div${JLAB XP NB TOOLBAR FRAG} -${JLAB XP BUSY KERNEL} //*[local-name() = 'div' and conttains(@class, 'jp-FilledCircleIcon' or (local-name() = 'svg' and contains(@data-icon, 'ui-components:circle-filled')))] -${CELL XP INPUT} div[contains(@class, p-Cell-inputWrapper)]/div[contains(@class,"jp-Cell-inputArea")] -${CELL XP INPUT STATUS ICON} ${CELL XP INPUT}/div[contains(@class,"jp-InputArea-prompt") and (.="[*]:")] -${CELL XP OUTPUT} div[contains(@class, jp-Cell-outputWrapper)]/div[contains(@class,"jp-Cell-outputArea")] -${CELL XP OUTPUT TEXT} ${CELL XP OUTPUT}//div[contains(@class,"jp-RenderedText")] -${NB TAB XP CONTENT} div[@aria-label="notebook content"] -## dock panel -${JLAB XP DOCK PANEL} //*[@id = 'jp-main-dock-panel'] -${JLAB XP DOCK TAB} ${JLAB XP DOCK PANEL}//ul[contains(@class, 'p-TabBar-content')]/li[contains(@class, 'p-TabBar-tab')] -${JLAB XP DOCK TAB LABEL} ${JLAB XP DOCK TAB}/div[contains(@class, 'p-TabBar-tabLabel')] From c7da89dad644551d8aab4c07b5cb8bdedea582e1 Mon Sep 17 00:00:00 2001 From: bdattoma Date: Mon, 3 Jan 2022 16:11:31 +0100 Subject: [PATCH 4/5] refactor tab selection keywords --- .../clients/jupyterlab/Notebook.resource | 11 ----------- src/JupyterLibrary/clients/jupyterlab/Shell.resource | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/JupyterLibrary/clients/jupyterlab/Notebook.resource b/src/JupyterLibrary/clients/jupyterlab/Notebook.resource index 3ae624ba..a198159e 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Notebook.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Notebook.resource @@ -52,14 +52,3 @@ Run Current JupyterLab Code Cell ... ${nb.find_element_by_xpath('''div${JLAB XP NB TOOLBAR FRAG}//${run icon}''')} Click Element ${run btn} Sleep 0.5s - -Get Selected Tab ID - [Documentation] Return the tab ID of the selected notebook tab - ${active-nb-tab} = Get WebElement xpath:${JLAB XP DOCK TAB SELECTED} - ${tab-id} = Get Element Attribute ${active-nb-tab} id - [Return] ${tab-id} - -Select Tab By Name - [Documentation] Select a notebook tab by filename - [Arguments] ${filename} - Click Element xpath:${JLAB XP DOCK TABBAR CONTENT}/li/div[.="${filename}"] \ No newline at end of file diff --git a/src/JupyterLibrary/clients/jupyterlab/Shell.resource b/src/JupyterLibrary/clients/jupyterlab/Shell.resource index a11f6a99..1ee1469d 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Shell.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Shell.resource @@ -78,3 +78,15 @@ Close JupyterLab Dock Panel Tab [Arguments] ${label} ${n}=1 ${tab} = Get JupyterLab Dock Panel Tab ${label} ${n} Click Element ${tab.find_element_by_xpath('./div[last()]')} + +Get Selected JupyterLab Dock Panel Tab + [Documentation] Return the web element of selected notebook tab and its tab id + ... It can be handful when working with more than one notebook file at time. + ${selected_nb_tab} = Get WebElement xpath:${JLAB XP DOCK TAB SELECTED} + ${tab_id} = Get Element Attribute ${selected_nb_tab} id + [Return] ${selected_nb_tab} ${tab_id} + +Select JupyterLab Dock Panel Tab By FilePath + [Documentation] Select a notebook tab by filepath. + [Arguments] ${filepath} + Click Element xpath:${JLAB XP DOCK TABBAR CONTENT}/li[contains(@title, "${filepath}")] From 1c518bf5bd79cdd440cd79e626cf1b0964c08fd7 Mon Sep 17 00:00:00 2001 From: bdattoma Date: Mon, 3 Jan 2022 18:00:51 +0100 Subject: [PATCH 5/5] renaming and small changes in output keywords --- src/JupyterLibrary/clients/jupyterlab/Output.resource | 8 ++++---- src/JupyterLibrary/clients/jupyterlab/Selectors.resource | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/JupyterLibrary/clients/jupyterlab/Output.resource b/src/JupyterLibrary/clients/jupyterlab/Output.resource index ec939b2e..da14327f 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Output.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Output.resource @@ -42,15 +42,15 @@ Screenshot Each Output Of Active JupyterLab Document Screenshot Markdown Of Active JupyterLab Cell ${prefix}_cell_${i} END -Wait Until a Given JupyterLab Code Cell Is Not Active In a Given Tab +Wait Until JupyterLab Code Cell Is Idle [Documentation] Waits until the given cell in a specific JL tab no longer has an active prompt "[*]:". ... The cell index starts from 1 and you must count empty and markdown cells too. - [Arguments] ${tab_id_to_wait} ${cell_n} ${timeout}=120seconds + [Arguments] ${tab_id_to_wait} ${cell_n} ${timeout}=30 Wait Until Element Is Not Visible xpath=//div[@aria-labelledby="${tab_id_to_wait}"]/${JLAB XP NOTEBOOK CONTENT}/div[${cell_n}]/${JLAB XP CELL INPUT STATUS ICON} ${timeout} Get A JupyterLab Code Cell Output In a Given Tab [Documentation] It returns the output of a given cell in a specific JL tab. ... The cell index starts from 1 and you must count empty and markdown cells too. [Arguments] ${tab_id_to_read} ${cell_n} - ${outputtext}= Get Text xpath=//div[@aria-labelledby="${tab_id_to_read}"]/${JLAB XP NOTEBOOK CONTENT}/div[${cell_n}]/${JLAB XP CELL OUTPUT TEXT}} - [Return] ${outputtext} \ No newline at end of file + ${output_children}= Get Web Elements xpath=//div[@aria-labelledby="${tab_id_to_read}"]/${JLAB XP NOTEBOOK CONTENT}/div[${cell_n}]/${JLAB XP CELL OUTPUT GENERIC} + [Return] ${output_children} \ No newline at end of file diff --git a/src/JupyterLibrary/clients/jupyterlab/Selectors.resource b/src/JupyterLibrary/clients/jupyterlab/Selectors.resource index 9e2e3ea9..1db89f8c 100644 --- a/src/JupyterLibrary/clients/jupyterlab/Selectors.resource +++ b/src/JupyterLibrary/clients/jupyterlab/Selectors.resource @@ -45,9 +45,11 @@ ${JLAB XP DOCK TAB} ${JLAB XP DOCK TABBAR CONTENT}/li[contai ${JLAB XP DOCK TAB LABEL} ${JLAB XP DOCK TAB}/div[contains(@class, 'p-TabBar-tabLabel')] ${JLAB XP DOCK TAB SELECTED} ${JLAB XP DOCK TABBAR CONTENT}/li[contains(@class,"lm-mod-current p-mod-current")] # notebook -${JLAB XP CELL INPUT AREA} div[contains(@class, p-Cell-inputWrapper)]/div[contains(@class,"jp-Cell-inputArea")] +${JLAB XP CELL INPUT AREA} div[contains(@class, "p-Cell-inputWrapper")]/div[contains(@class,"jp-Cell-inputArea")] ${JLAB XP CELL INPUT STATUS ICON} ${JLAB XP CELL INPUT AREA}/div[contains(@class,"jp-InputArea-prompt") and (.="[*]:")] -${JLAB XP CELL OUTPUT AREA} div[contains(@class, jp-Cell-outputWrapper)]/div[contains(@class,"jp-Cell-outputArea")] +${JLAB XP CELL OUTPUT AREA} div[contains(@class, "jp-Cell-outputWrapper")]/div[contains(@class,"jp-Cell-outputArea")] ${JLAB XP CELL OUTPUT TEXT} ${JLAB XP CELL OUTPUT AREA}//div[contains(@class,"jp-RenderedText")] -${JLAB XP NOTEBOOK CONTENT} div[@aria-label="notebook content"] +${JLAB XP CELL OUTPUT GENERIC} ${JLAB XP CELL OUTPUT AREA}//div[contains(@class,"jp-Rendered")] +${JLAB XP NOTEBOOK CONTENT} div[contains(@class, "jp-NotebookPanel-notebook")] +