extended-salmon•3y ago
Checking boxes with Selenium
Does anyone know what I'm doing wrong? I've tried finding the element and clicking it but get an error that the element isn't interactable. I have also tried executing a script that would check the boxes and the actor will succeed in running but after looking at the screenshot no checkboxes were checked. Any help in the right direction is appreciated.
Here's the code that gets the error of element not interactable:
Here's the code that runs but does nothing:
2 Replies
hello @SmilinDesperado ,
It is hard to say when we don't know the website.
- I would suggest count the elements, to know you are using the right selector (not all checkbox has to be implemented only by semantic
<input type="checkbox">
element).
- Improve a logging to see if the checkboxes are already really unselected.
- Another thing could be that this input[type="checkbox"]
elements are not visible (and that also means clickable/interactable), when you execute the code - often they are just used as a state-holders for submitting the form, but the real interaction is done with different <div>
based elements, because it allows to do a lot more fancy css styling.extended-salmonOP•3y ago
never mind. i was able to figure it out. my code that executes the script does work, it was my screenshots that i had setup wrong and was basically just showing myself the same one multiple times 😅 thank you for your help