New issue
Advanced search Search tips

Issue 672114 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue chromedriver:907
Owner: ----
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 2
Type: Bug



Sign in to add a comment

Set Script Timeout JSON Wire Protocol Doesn't Work

Project Member Reported by robertogden@chromium.org, Dec 7 2016

Issue description

(Please change component as needed, not sure where this should go)

Chrome Version: 55.0.2883.75 (Official Build) (64-bit)
OS: Reproduced on Linux, Android. possibly more

What steps will reproduce the problem?
```python
import time
import json
import sys
import os
import threading
import socket

from selenium import webdriver

# Set chromedriver path here if needed
driver = webdriver.Chrome()

driver.set_page_load_timeout(1)
driver.get('https://www.google.com')

driver.set_script_timeout(1)

# Hangs here.
print driver.execute_async_script("while(true) { console.log('hi') }")

driver.quit()
```

What is the expected result?
The browser should timeout on the running script after 1 second.

What happens instead?
No timeout, the browser hangs indefinitely, and no response is made over the JSON wire protocol.

Additional Info:
A simple Wireshark capture shows that Chrome never responds to the execute script request, despite a successful setting of the timeout beforehand. 
A timeout is received if the given javascript does complete without calling the callback, but not if the javascript fails to finish before the timeout. 

 
Mergedinto: chromedriver:907
Status: Duplicate (was: Untriaged)
Thanks for reporting the issue! Since same bug is already logged in chromedriver issue tracker, marking this duplicate to issue chromedriver:907

Sign in to add a comment