with selenium nodes upload files from pc to web browser

Hi; @qqilihq

With selenium nodes is it possible to upload files from pc to web browser?

I want to automate uploading to an authenticated web page. I can do that. After logging in to the web tariff, clicking on the file upload button opens the window to download the file from the PC and upload the file. It’il be great if I can.

Hi,

In the page that you have the upload button, there should be an input element which gets the file address (I suggest you to right click on that upload button and select Inspect and there should be an input element for that button). You can select that element in “Find Element” node and send the address (e.g. C:\\folder\\image.jpg) using a “Send Keys” node.

Best,
Armin

1 Like

Hi; Armin @armingrudd
The sample page is as in the picture. I couldn’t understand what kind of choice or entry I had to make in the window that opened to upload from PC.

What kind of work step?

At the web page where it asks you to drop a file or click to choose one, right click and select “Inspect” then you’ll find an input element of type “file”. Select this element with “Find Element” node and send the address using “Send Keys” node.

1 Like

This might be a bit tricky in your case:

The page should contain an <input type="file"> element for the uploaded file (if it’s not visible on the page, it should still be present in the DOM). You can set the file path through the “Send Keys” node as described by @armingrudd.

[edit] Whoups, @armingrudd was faster :+1:

2 Likes

Yeah @qqilihq :sweat_smile: just a min :wink:
Sorry if I’m intruding your territory :face_with_head_bandage:

Not at all. Very appreciated! Thanks for supporting!

1 Like

Dear Armin @armingrudd and Dear Philipp @qqilihq

Thank you! You can add a sample file upload stream without a password entry. Because I can do part of the entry and page progress. I can’t figure out the progress steps after you click on the file upload button. it also gives me the chance to learn if there is at least one example of how to add the file path to the file without opening the screen or opening the screen.

I ask you. Please add a workflow instance that opens and installs a file upload screen that does not contain a password entry.

@armingrudd and @qqilihq
I don’t know what to do after the window opens. how do I redirect? I couldn’t see an input option. I couldn’t find it (because I didn’t know too well). Here you need help right here to select and send the file

Next step of selecting and sending?

I have a surprise for you!
Just wait a bit more :blush:

Armin

1 Like

Dear Armin
I have a lot to learn from you :slight_smile:
You’re always helping me with the solution. I am thankful to you

1 Like

Thanks for waiting,

Here I have a workflow example in which I have logged into GitHub.com and upload some file to a repository:
Selenium File Upload.knwf (34.2 KB)

To help you and other users more, I have published a video on my YouTube channel and have explained the workflow completely:

Best,
Armin

4 Likes

Dear; Armin

This is really cool. You have made a useful and descriptive video for everyone. I’m sure a lot of people will benefit.

Thank you for your sample work :+1::blush:

1 Like

I’m trying, but I can’t verify elemet. Which one do you think Armin

Exactly the one which is highlighted. :wink:

Deniyorum ama yanlış yapıyorum olmadı. Bana yazabilirmisin

body > div > div > div > div > div > div > input (selector)
/html/body/div/div/div/div/div/div/input (xpath)

“input type=“file” class=“hide” accept=”.csv,text/csv">

Use this XPath in “Find Elements” node.
Untitled

Please watch the video carefully and you will be able to do the job.

1 Like

?
image

Would you please provide the URL address of the website?