Skip to content
Advertisement

selenium java load image in for xlink:href attribute

I am trying to load images in one website, but I didn’t succeed,

This is the Source Code when pressing F12

JavaScript

However I tried many codes :

JavaScript

But anyone of them is working with, can you help me please, This is the code source extract of the webpage which I would like to automate by loading images in it.

I am trying to automate one stuff boring (add a post) in this website (url removed)

Then click on “deposer-une-annonce” and follow steps until come to one step to load images, in this step I can’t load image automatically by using selenium java as I explained above

Advertisement

Answer

I see one input tag that has type as file.

But I couldn’t figure out your website, so I could not enable that input field.

But I believe if you send_keys to Quel est le titre de l’annonce ? with some other input, it may help you past this issue.

Anyway to upload an image, you can use the below css selector :-

JavaScript

and in code :

JavaScript

or with Explicit waits :

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement