R
R
Rudy9962022-04-07 18:07:17
Python
Rudy996, 2022-04-07 18:07:17

How to click on a color in Selenium?

Have to play. Crystals appear and you need to click on them. Is it possible somehow through selenium to make clicks on the color for the game as a canvas element

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2022-04-07
@FCKJesus

It’s hard to say without the element code, but as an option, you can implement this approach

for element in driver.find_elements(By.CLASS_NAME,  "your_class"):
     if element.value_of_css_property("color") == "red":
          element.click()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question