You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
${JLAB CSS ACTIVE DOC} .jp-Document:not(.jp-mod-hidden)
13
+
${JLAB CSS ACTIVE CELL}${JLAB CSS ACTIVE DOC} .jp-Cell.jp-mod-active
14
+
${JLAB CSS ACTIVE INPUT}${JLAB CSS ACTIVE CELL} .CodeMirror
15
+
${JLAB XP NB TOOLBAR FRAG} [contains(@class, 'jp-NotebookPanel-toolbar')]
16
+
${JLAB CSS ACTIVE DOC} .jp-Document:not(.jp-mod-hidden)
17
+
${JLAB CSS ACTIVE DOC CELLS}${JLAB CSS ACTIVE DOC} .jp-Cell
18
+
${JLAB CSS ACTIVE CELL}${JLAB CSS ACTIVE DOC} .jp-Cell.jp-mod-active
19
+
${JLAB CSS ACTIVE INPUT}${JLAB CSS ACTIVE CELL} .CodeMirror
10
20
11
21
*** Keywords ***
12
22
Get JupyterLab Selected Tab Label
@@ -29,6 +39,7 @@ Wait Until ${filename} JupyterLab Tab Is Selected
29
39
30
40
Close Other JupyterLab Tabs
31
41
${original_tab} = Get WebElement xpath:${JL_TABBAR_SELECTED_XPATH}/div[contains(@class, "p-TabBar-tabLabel")]
42
+
#${original_tab} = Get WebElement xpath:${JL_TABBAR_SELECTED_XPATH}/div[contains(concat(' ',normalize-space(@class),' '),' p-TabBar-tabLabel ')]
32
43
33
44
${xpath_background_tab} = Set Variable xpath:${JL_TABBAR_NOT_SELECTED_XPATH}
34
45
${jl_tabs} = Get WebElements ${xpath_background_tab}
@@ -38,14 +49,17 @@ Close Other JupyterLab Tabs
38
49
Click Element ${tab}
39
50
#Click the close tab icon
40
51
Open With JupyterLab Menu File Close Tab
41
-
Maybe Accept a JupyterLab Prompt
52
+
Sleep 2
53
+
Maybe Close Popup
42
54
END
55
+
Sleep 2
56
+
Maybe Close Popup
43
57
Element Should Be Visible ${original_tab}
44
58
Element Should Not Be Visible ${xpath_background_tab}
45
59
46
60
Close JupyterLab Selected Tab
47
61
Click Element xpath:${JL_TABBAR_SELECTED_XPATH}/div[contains(@class,"lm-TabBar-tabCloseIcon")]
48
-
Maybe Accept a JupyterLab Prompt
62
+
Maybe Close Popup
49
63
50
64
JupyterLab Code Cell Error Output Should Not Be Visible
51
65
Element Should Not Be Visible xpath://div[contains(@class,"jp-OutputArea-output") and @data-mime-type="application/vnd.jupyter.stderr"] A JupyterLab code cell output returned an error
@@ -91,15 +105,15 @@ Logout JupyterLab
91
105
92
106
Run Cell And Check For Errors
93
107
[Arguments]${input}
94
-
Add and Run JupyterLab Code Cell ${input}
108
+
Add and Run JupyterLab Code Cell in Active Notebook ${input}
95
109
Wait Until JupyterLab Code Cell Is Not Active
96
110
#Get the text of the last output cell
97
111
${output} = Get Text (//div[contains(@class,"jp-OutputArea-output")])[last()]
98
112
Should Not Match ${output} ERROR*
99
113
100
114
Run Cell And Check Output
101
115
[Arguments]${input}${expected_output}
102
-
Add and Run JupyterLab Code Cell ${input}
116
+
Add and Run JupyterLab Code Cell in Active Notebook ${input}
103
117
Wait Until JupyterLab Code Cell Is Not Active
104
118
#Get the text of the last output cell
105
119
${output} = Get Text (//div[contains(@class,"jp-OutputArea-output")])[last()]
@@ -110,20 +124,22 @@ Maybe Select Kernel
110
124
Run Keyword If not ${is_kernel_selected} Click Button xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"]/..
111
125
112
126
Clean Up Server
113
-
Maybe Accept a JupyterLab Prompt
127
+
Sleep 1
128
+
Maybe Close Popup
114
129
Navigate Home (Root folder) In JupyterLab Sidebar File Browser
130
+
Open With JupyterLab Menu File Close All Tabs
131
+
Maybe Close Popup
132
+
Sleep 1
133
+
Maybe Close Popup
115
134
Open With JupyterLab Menu File New Notebook
116
-
Sleep 5
117
-
Maybe Select Kernel
118
-
Close Other JupyterLab Tabs
135
+
Sleep 1
136
+
Maybe Close Popup
119
137
Open With JupyterLab Menu File Open from Path…
120
138
Input Text xpath=//input[@placeholder="/path/relative/to/jlab/root"] Untitled.ipynb
121
139
Click Element xpath://div[.="Open"]
122
-
Sleep 5
123
-
Maybe Select Kernel
140
+
Maybe Close Popup
124
141
Wait Until Untitled.ipynb JupyterLab Tab Is Selected
125
-
Close Other JupyterLab Tabs
126
-
Add and Run JupyterLab Code Cell !rm -rf *
142
+
Add and Run JupyterLab Code Cell in Active Notebook !rm -rf *
127
143
128
144
129
145
Get User Notebook Pod Name
@@ -160,7 +176,7 @@ Clean Up User Notebook
160
176
161
177
162
178
JupyterLab Is Visible
163
-
${jupyterlab_visible} = Run Keyword and Return Status Wait Until Element Is Visible xpath:${JL_TABBAR_CONTENT_XPATH} timeout=60
179
+
${jupyterlab_visible} = Run Keyword and Return Status Wait Until Element Is Visible xpath:${JL_TABBAR_CONTENT_XPATH} timeout=30
164
180
[return]${jupyterlab_visible}
165
181
166
182
Wait Until JupyterLab Is Loaded
@@ -178,7 +194,7 @@ Clone Git Repository And Open
178
194
[Documentation] The ${NOTEBOOK_TO_RUN} argument should be of the form /path/relative/to/jlab/root.ipynb
179
195
[Arguments]${REPO_URL}${NOTEBOOK_TO_RUN}
180
196
Clone Git Repository ${REPO_URL}
181
-
Sleep 10
197
+
Sleep 15
182
198
Open With JupyterLab Menu File Open from Path…
183
199
Input Text xpath=//input[@placeholder="/path/relative/to/jlab/root"] ${NOTEBOOK_TO_RUN}
0 commit comments