Skip to content
Advertisement

Selenium Python .click() not working on one element

So, I am trying to make a simple project that simply just auto clicks all the details to fill out a form to get ready to post. It works perfectly up until just one element. There are 2 very similar elements; ones a category and the other is a sub-category. It states its unable to find the element, I’m fairly new to selenium so if anyone has an opinions they can give me that would be very helpful. I tried a few other methods too, using different identifiers, like its class.

JavaScript

Advertisement

Answer

I’ve modified your code as below, try this:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement