with selenium nodes upload files from pc to web browser

I was working on it. You are right. There is some issue that I don’t understand too.
@qqilihq, Would you please take a look at this website?


The input element is hidden and in DOM there is only one input element which is not the one for the file upload.
I could even navigate to the block for the csv import but the input element cannot be selected.
If you create an account and login, you have to click on “Project Tracker” then top right “Blocks”, then “Add a block” and add a “CSV import” block.
One can import csv files via this block but how can we do it by selenium nodes? (how to select the input element)
Here is the workflow I created up to the point of sending file path to the input element. (Username and Password included - it’s just a test account)
input element.knwf (32.0 KB)

Airtable is a very nice app and you can even use it like excel online. I’ve been using it for a while, very functional. The other issue is the airtable I have a paid account and am entering my password. maybe I didn’t allow you to upload a file. But you can test a free account in a few minutes for the selenium file upload screen.

And I am sure that airtable users will be able to do a lot of work on uploading files. For those trying to transfer a lot of files updated on the same day as me.

Dear Armin; Thanks for your efforts and support I’m sorry for taking your time. @armingrudd

Dear Philipp @qqilihq; I would be very pleased if you could help us for the solution at the last point.

Dear Philipp @qqilihq;

Can you look at the available time? I’d be happy to solve this problem.
We’ve moved on here, but I need your help to keep going.

Thanks :raising_hand_man:

Dear Armin @armingrudd
is it possible to produce a solution from the detail in this screenshot?

xpath
html/body/div[1]/div[4]/div[1]/div/div[1]/div[2]/div/div[2]/div[1]/div[2]/div/div/div[2]/div/iframe

seems to be completing when using xpath this way but the file upload pc screen hurts and stays?

like a little bit missing. Even though the workflow is completed, it is actually incomplete


I’m currently overwhelmed with work, so I didn’t have time to look at the WF or the site in detail. But, what catches my eye:

html/body/div[1]/div[4]/div[1]/div/div[1]/div[2]/div/div[2]/div[1]/div[2]/div/div/div[2]/div/iframe

Obviously, the page you’re working with contains <iframe>s. In case you want to access elements within an <iframe>, you need to explicitly switch to this iframe first. We have actually discussed this a while ago in the following thread:

– Philipp

1 Like

Hi; Philipp @qqilihq
The case of iframe is different from the previous one. If you have time to request from me, please check the web page above and above the airtable.com link.

The solution will alleviate a lot of work load for me if possible. I’d appreciate it if you could help me.

Thanks

What exactly is the issue?

As I said, I currently do not have much free time. If you can supply me with a minimal sample workflow which shows the issue right away, including a test account for the website if necessary, it’s more likely that I’ll be able to have a look soon.

– Philipp

Hi; Philipp @qqilihq
I sent your workflow to your mail address.
The problem is in the file path. I couldn’t share it here because it contains the password information and I sent you the mail flow. Because the trial version csv file installation screen is not active.

I’ll be glad to review

You need to use a Send Keys to send the file path to the <input type="file" class="hide" accept=".csv,text/csv"> element. But: Do not click on any ‘upload’ button etc., as this will open a file chooser dialog and from that point on you will no longer be able to control your browser through Selenium.

As stated above, you’ll need to enter the <iframe>, before you can address the <input> element.

See here:

This should do.

PS: Most of the Wait nodes in your workflow are actually not necessary. If you remove them, it will run much faster. You’ll only need those nodes, if you need to wait for an element on the page to appear after the page has loaded (“AJAX”).

1 Like

I tried, but it didn’t. Can you correct and send the workflow I sent
I do not want to engage you in this matter any more.

This is how the workflow looks (cleaned up and removed unnecessary click and wait nodes). Please check the node comments to get an idea about the steps:

I’ll send a copy by email.

2 Likes

Philipp @qqilihq
Super and wonderful :slight_smile: I’m eagerly waiting. If it works, I’ll get rid of the +200 file load every day.

Why didn’t you share the workflow here in forum @qqilihq ?
Here as you see I was trying to do the same thing. And I couldn’t get the frame. I like to take a look at your workflow and find out how to get the frame element (actually I was able to find the frame but the input element wasn’t there :sweat_smile:)
Would you please share the workflow (or at least the part after login metanode)?

Thank you so much.
Armin

Dear Armin; @armingrudd @qqilihq
We didn’t share it because it contains a password and user, but I’ll share one instance. :wink: I haven’t tested it yet because the system I started living in before had started the problem of opening the browser. After testing, I will share the result.

1 Like

Armin ; An example of a workflow that is specific to this situation can be found in the Appendix. Of course you and Philipp should be noted without forgetting their support. Philipp has provided the solution. Thank you for taking care of your time and interest.
@armingrudd and @qqilihq
Regards

2 Likes

Hi; Philipp / Armin @armingrudd @qqilihq
What is the error in the file path? I tried different ways but couldn’t figure it out?
image

The \ is missing. See the error message in the tooltip, it says C:foo.csv.

Hi,
As I told you here you have to provide double backslashes to “Send Keys”.
As you can see, the “URL to File Path” is providing the path with single backslash.
So you have to modify that. To do that you can use a “String Manipulation” or “String Replacer” as shown below:
String Manipulation:

String Replacer:

I know this is crazy, But this is how you can deal with backslash which is the escape character.

Best,
Armin

1 Like

Heyyy ; Armin

you did :slight_smile: supersriven again superrrrr

1 Like