kaliiiiiiiiii/Selenium-Driverless

[BUG] screenshot error

zyoung1212 opened this issue · 1 comments

version: 1.9.3.1

code:

from selenium_driverless.sync import webdriver

options = webdriver.ChromeOptions()
options.headless = False
with webdriver.Chrome(options=options) as driver:
    driver.get('https://www.browserscan.net')
    driver.sleep(5)

    title = driver.title
    url = driver.current_url
    source = driver.page_source
    print(title)
    driver.save_screenshot('nowsecure2.png')

error:
.venv/lib/python3.11/site-packages/cdp_socket/socket.py", line 101, in exec
raise SocketExcitedError("socket coroutine excited without exception")
cdp_socket.exceptions.SocketExcitedError: socket coroutine excited without exception

this occurs due to how sync works.
Unless this is reproducible with async, this will not be fixed for now.

See Readme.md:

asyncified, might be buggy