Skip to content

Commit a5052e7

Browse files
committed
Try to fix previous commit
1 parent 3d546e3 commit a5052e7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

scripts/automated-notebook-run-script.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def run_notebook(driver, notebook_area, args):
8888

8989
if cell_is_waiting_for_input(driver):
9090
print("Cell requesting input")
91+
current_cell = driver.find_element(
92+
By.CSS_SELECTOR, ".jp-Notebook-cell.jp-mod-selected"
93+
)
9194
input_box = WebDriverWait(driver, 5).until(
9295
EC.visibility_of_element_located((By.CSS_SELECTOR, ".jp-Stdin-input"))
9396
)
@@ -125,11 +128,11 @@ def run_notebook(driver, notebook_area, args):
125128
time.sleep(0.1)
126129
if not cell_is_waiting_for_input(driver):
127130
wait_for_idle_status(driver, current_cell, start_time, args.timeout)
128-
next_cell = current_cell.find_element(
129-
By.XPATH,
130-
"following-sibling::div[contains(@class,'jp-Notebook-cell')][1]",
131-
)
132-
current_cell = next_cell
131+
next_cell = current_cell.find_element(
132+
By.XPATH,
133+
"following-sibling::div[contains(@class,'jp-Notebook-cell')][1]",
134+
)
135+
current_cell = next_cell
133136

134137
def download_notebook(driver):
135138
"""This function is used to download the notebook currently open."""

0 commit comments

Comments
 (0)