I’m using Python 3.11.5, and I want to extract text from a Webelement with selenium.
I use Chromedriver as a driver, and I want to find an element By.CLASS_NAME
Here is my code
What happens ?
When I print (element), it gives me a Webdriver element, which I can’t read.
When I print (element.text), it gives me an error :
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x000001DDFE4F0690>: Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée’)’: /session/0109eeaf781d2f899ee82e0fd10eac19/execute/sync
What have I tried ?
After using driver.get(url), I already tried to apply time.sleep(10)
I checked my versions of Chrome + Chromedriver
I disabled my proxy
Do you have any idea about what the problem is ?