(Session info: chrome=69.0.3497.92)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.10.0-42-generic x86_64)
Python code to reproduce:
```
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://www.google.com")
driver.execute_script("return window")
```
Response:
```
>>> driver.execute_script("return window")
DEBUG - POST http://127.0.0.1:42663/session/7604aae6d0535b100dd0674dce61cc6c/execute {"sessionId": "7604aae6d0535b100dd0674dce61cc6c", "args": [], "script": "return window"}
DEBUG - {"sessionId":"7604aae6d0535b100dd0674dce61cc6c","status":0,"value":[]}
DEBUG - Finished Request
[]
```
**Webdriver.execute_script doesn't want return a window object** from browser-under-test. I receive a NULL instead of dictionary of data.
At the same time 'screen' and 'document' returned as expected
>>> driver.execute_script("return screen")
DEBUG - {"sessionId":"7604aae6d0535b100dd0674dce61cc6c","status":0,"value":{"availHeight":1026,"availLeft":49,"availTop":24,"availWidth":1631,"colorDepth":24,"height":1050,"orientation":{"addEventListener":{},"angle":0,"dispatchEvent":{},"lock":{},"onchange":null,"removeEventListener":{},"type":"landscape-primary","unlock":{}},"pixelDepth":24,"width":1680}}
>>> driver.execute_script("return document")
DEBUG - {"sessionId":"7604aae6d0535b100dd0674dce61cc6c","status":0,"value":{"ELEMENT":"0.2432158247155225-1"}}
For Firefox this issue isn't applicable
--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I checked the case when I ask ChromeDriver to return a string/int (not object) it returns it well.
Thank you for your comments