To keep it brief, I'm facing an issue while trying to automate this survey on the website:
The problem arises when I attempt to click the 'Sélectionnez votre réponse' button using the webdriver, leading to multiple errors:
- ConnectionRefusedError: [Errno 61] Connection refused
- urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fe51e4a5d90>: Failed to establish a new connection: [Errno 61] Connection refused
- urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=61616): Max retries exceeded with url: /session/84d1bcb3f29dcea5ebc17515f7006576/element (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe51e4a5d90>: Failed to establish a new connection: [Errno 61] Connection refused'))
In an attempt to address this issue, I've tried manipulating the hidden tab as follows:
Given the HTML structure:
<div aria-describedby="Select_0_placeholder" aria-expanded="false" aria-label="Sélectionnez votre réponse" class="office-form-question-dropdown [the rest is not important]
I experimented with changing the value of aria-expanded
through JavaScript to reveal the hidden tab. Here's the script I used:
driver.execute_script("document.getElementById('Select_0').aria-expanded = true ;");
Unfortunately, this resulted in the following error: "javascript error: Invalid left-hand side in assignment"
I'm struggling to find a solution to this recurrent issue and unsure if resolving it will also fix the 'connection refused' problem I encounter while clicking on the element.
Your assistance in solving this puzzle would be greatly appreciated. Thank you!