R
R
Robot2052020-03-29 09:31:03
Python
Robot205, 2020-03-29 09:31:03

Classlist analog on selenium?

Good day. Tell me how to implement such a task in Selenium: there is a cycle that goes through the elements and if the condition matches, makes a click on this element, then you need to exclude this element from the cycle.
I used classlist on js: loop -> make a click -> add to classlist -> If Not classlist.contains Continue

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-03-29
@bacon

Well, if you know js, then use it for selenium, why do you need python?

A
Akshin Yolchuev, 2020-03-29
@Akshin17

add the title of the element to an empty array and write in advance that if a (This is an array) in b (this is what you take): well, the action
One word if the selected element already exists in the array, then skip it, if not, then add

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question