Forums

Seleniun does not work with a website element

Hello guys!

I am totally new in the fórum and I apreciate your work to keep alive this community.

I am trying to automatic a website ckick button using selenium and the next method:

WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH,'/html/body/div[5]/div/div/div/div/div[1]/a/div[2]/input'))).send_keys(Keys.RETURN)

The XPATH is referenced to the next website element:

enter image description here

After inspecting the website programming the “Subit Archivos” element is programmed like this:

<input accept="video/*, image/*" multiple="" display="inline-block" type="file" class="_n _5f0v" id="js_31">

When I executed the previous Python method, the linker gives me the next error: “selenium.common.exceptions.TimeoutException: Message:”

It is like the method is no table to detect the button…Any idea why is happening this?

Thanks in advance Greetings.

The most likely is that the page that you're getting with selenium is not the same as the one that you are seeing in your browser. There can be many reasons for this. Check the content that selenium is actually getting so you can see why the element is not there.

Hi!

I haver alredy solved the problem. I changed the way to detect the element and now it is working fine. I was finding the wrong xpath :-)

Thanks a lot !

Glad to hear you got it working!