P
P
PrO_KoTeJkA2019-03-05 20:35:21
Python
PrO_KoTeJkA, 2019-03-05 20:35:21

How to wait for multiple elements at the same time in Selenium?

There are lines of code like this:

<div class="round">
<div class="one" style=""></div>
<div class="two" style=""></div>
<div class="two" style=""></div>
<div class="one" style=""></div>
<div class="three" style=""></div>
<div class="two" style=""></div>

Classes are constantly changing randomly. It is necessary for me that when in the first and in the second cell there was a class 'two' the code worked.
I need to somehow wait for 2 elements at the same time.
I tried to do it with the command
wait.until(EC.presence_of_all_elements_located((By.XPATH
but the code works every other time...
If someone knows, please help me, because I am new to Selenium.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2019-03-05
@dimonchik2013

and if three, is that all?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question