Skip to content

Commit 0138f1f

Browse files
committed
Revert dialog acceptance, fix the menu item xpath
JupyterLab 3.4 has new "New Notebook" item which was wrongly getting selected instead of the "Notebook" choice.
1 parent 3d82352 commit 0138f1f

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

atest/Keywords.resource

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,6 @@ Setup Notebook
281281
IF ${isolated} Try to Close All Tabs
282282
Open ${file} in ${MENU NOTEBOOK}
283283
Capture Page Screenshot 00-notebook-opened.png
284-
# Kernel selection dialog may show up if the ipykernel version changed
285-
# since the last time notebooks were updated; because we are testing
286-
# with different ipykernel versions, this is inevitable. In such a case
287-
# accept the suggested kernel choice
288-
IF ${wait}
289-
Wait Until Page Contains Element css:div.lsp-statusbar-item
290-
Wait For Condition
291-
... return document.querySelector('div.lsp-statusbar-item').textContent.includes('Fully initialized') || document.querySelector('.jp-Dialog') !== null;
292-
... timeout=180s
293-
ELSE
294-
Wait For Dialog
295-
END
296-
${count} = Get Element Count ${DIALOG WINDOW}
297-
IF ${count} != 0 Accept Default Dialog Option
298284
IF ${wait} Wait Until Fully Initialized
299285
Capture Page Screenshot 01-notebook-initialized.png
300286

atest/Variables.resource

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ ${CSS DIALOG OK} css:.jp-Dialog .jp-mod-accept
2929
${MENU OPEN WITH} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "Open With")]
3030
# R is missing on purpose (may need to use .)
3131
${MENU RENAME} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(., "ename")]
32-
# N is missing on purpose
33-
${MENU NOTEBOOK} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(., "otebook")]
32+
# N is missing on purpose (N is in separate <span>)
33+
${MENU NOTEBOOK} xpath://li[@data-command='filebrowser:open']/div[contains(@class, 'lm-Menu-itemLabel')][contains(., "otebook")]
3434
${DIAGNOSTICS PANEL} id:lsp-diagnostics-panel
3535
${DIAGNOSTIC PANEL CLOSE} css:.lm-DockPanel-tabBar .lm-TabBar-tab[data-id="lsp-diagnostics-panel"] .lm-TabBar-tabCloseIcon
3636
${DIALOG WINDOW} css:.jp-Dialog

0 commit comments

Comments
 (0)