H
H
Held69912021-09-06 20:47:22
Python
Held6991, 2021-09-06 20:47:22

Why is Selenium button click not working?

Hello, there is such a button:
613653e7211a6531937236.png
I want to click on it, here is the code -

chrome.find_element_by_xpath('//input[@value="Выберите файл..."]').click()

As a result, I have this error:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

What is the problem and how to fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
Held6991, 2021-09-07
@Held6991

The click didn't work because I had to insert a delay of 1 second

P
Python Newbie, 2021-09-06
@Levman5

Find the xpath of the location where you want to drag the file and try the following code

upload = driver.find_element_by_xpath("тут xpath")
upload.send_keys("‪путь до файла")

Source: https://coderoad.ru/8428102/Upload-file-with-Selen...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question