Skip to content
Advertisement

How to click all of the same text span by using selenium?

I try the code

JavaScript

but only first element been clicked

so I edit like this but won’t work

JavaScript

website is

http://211.21.63.217:81/ticket_online.aspx

How to click all of the span text is 08/28 ?

JavaScript

Advertisement

Answer

See, when you did this :

JavaScript

you must have got web element is not iterabel error.

that is due to you are using find_element, try to use find_elements.

also, I tried the below code in my local,

JavaScript

seems to do the job that you’ve been looking for.

Imports :

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