File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 88from selenium .webdriver .common .by import By
99from selenium .webdriver .common .keys import Keys
1010import time
11-
11+ import subprocess
1212
1313def 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
You can’t perform that action at this time.
0 commit comments