A
A
Alikhan2022-01-07 08:37:46
selenium
Alikhan, 2022-01-07 08:37:46

How to make element clickable Selenium Python?

How to make element clickable Selenium Python? You need to click on an element that is a label, but selenium complains when you click on it (because the element is not clickable).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2022-01-07
@phaggi

It is better to give snippets of the selenium code and the code of the page in which we are trying to click the label.
There are options.

  • Perhaps pause 2-3 seconds before clicking.
  • You can try the submit method instead of the click method if the label is associated with a form element like input - this might help.
  • It is possible to perform a click through JS (you can search, it's full on the Internet, like
    driver.execute_script("document.getElementsByClassName('label')[0].click()")
    or another method, but I don’t see that you have a “label” there.
  • Perhaps selecting an element via css helps sometimes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question