Skip to content

Commit 9dd459f

Browse files
authored
Update automated-notebook-run-script.py
1 parent 254ee6b commit 9dd459f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/automated-notebook-run-script.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ def main():
175175
print("Found element:", download_button)
176176

177177
time.sleep(20)
178-
driver.execute_script(
179-
"""
178+
click_download_button_script = """
180179
const el = arguments[0];
181180
182181
// Force element to be visible and focused
@@ -190,9 +189,11 @@ def main():
190189
composed: true, // IMPORTANT for shadow DOM
191190
view: window
192191
}));
193-
});
194-
""",
195-
download_button,
192+
});
193+
"""
194+
195+
download_button = WebDriverWait(driver, 20).until(
196+
lambda d: d.execute_script(click_download_button_script,download_button)
196197
)
197198

198199
time.sleep(20)

0 commit comments

Comments
 (0)