Skip to content

Commit 9320705

Browse files
committed
Debug
1 parent 83f9cf3 commit 9320705

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/automated-notebook-run-script.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from selenium.webdriver.common.by import By
99
from selenium.webdriver.common.keys import Keys
1010
import time
11-
11+
import subprocess
1212

1313
def main():
1414
parser = argparse.ArgumentParser(description="Run Selenium with a chosen driver")
@@ -109,7 +109,7 @@ def main():
109109
notebook_area.send_keys(Keys.SHIFT, Keys.ENTER)
110110
time.sleep(0.5)
111111

112-
time.sleep(650)
112+
time.sleep(5)
113113

114114
if args.driver == "chrome" or args.driver == "firefox":
115115
print("Saving notebook")
@@ -190,6 +190,16 @@ def main():
190190
""",
191191
download_button,
192192
)
193+
applescript = '''
194+
tell application "System Events"
195+
tell process "Safari"
196+
delay 1
197+
click button "Allow" of window 1
198+
end tell
199+
end tell
200+
'''
201+
202+
subprocess.run(['osascript', '-e', applescript])
193203
time.sleep(2)
194204

195205
# Close browser

0 commit comments

Comments
 (0)