some fixes

This commit is contained in:
Rusko124
2018-10-04 13:26:04 +06:00
parent c3099bf4ad
commit 759481a365
2 changed files with 3 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
set show_status = 0
set ssl_verify = 1
set on_event = request ON_EVENT
@on_event LOAD_START js alert=function(e){return true};confirm=function(e){return true};prompt=function(e){return true};

View File

@@ -250,13 +250,13 @@ def browser_send(command, cb=lambda _: True):
browser.process.stdin.put(command + '\n')
while True: # loop until cb returns True
try:
event = browser.next()
browser_event = browser.next()
except StopIteration:
break
if 'FOCUS_LOST' in event:
if 'FOCUS_LOST' in str(browser_event):
browser_focus_lost = True
break
if cb(event):
if cb(browser_event):
break
else:
logging.info('browser found dead, restarting')