kaliiiiiiiiii / Selenium-Driverless

undetected Selenium without usage of chromedriver
https://kaliiiiiiiiii.github.io/Selenium-Driverless/
Other
545 stars 66 forks source link

[BUG] screenshot error #249

Closed zyoung1212 closed 3 months ago

zyoung1212 commented 3 months ago

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

kaliiiiiiiiii commented 3 months ago

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