Katalon Automation Recorder - How to do a File Upload? HTMLInputElement


#22

Wow, I was struggling with the upload file for a while. That is: until I discovered this thread today. Thank you very much for this life-saving info, Alex & Patrick!


#23

Yes, I finally got my code to work. thank you so much.


#24

Hello!
Can i upload file in Iframe?
I’m trying to use in Chrome extension:

selectFrame | css=#frameId |
type | css=#inputFileId | C:\file

It doesn’t work :frowning:


#25

@Jack Benton,

Thank you for the bug report. We will investigate the issue. I’ll keep you posted.


#26

Alex said:

Hi everyone,

I just want to inform that since 3.4.10 the limitation with CSS locators has been lifted. Now you can set file input values in Chrome using all types of locators.

Regarding Firefox version, I would like to ask you a question. Would it help if we add the ability to call external applications (e.g. AutoIT), and you can use them to automate steps that we cannot?

Thank you all for your support :).

Hi Alex,

anything new on this issue?

Not being able to import files in FF is a huge roadblock for us at the moment.

Using autoIT, autoHotkey or something similar wouldn’t be the most graceful solution, but at least we could go on porting our cases from Selenium to Katalon.

Thank you!!


#27

Thank you for the feedback. We found a solution and will have a release for it. We know it has been a while and we will try to deliver it as soon as possible.


#28

Alex said:

Thank you for the feedback. We found a solution and will have a release for it. We know it has been a while and we will try to deliver it as soon as possible.

Awesome!

Thanks for all the hard work you guys put into this.


#29

Had a similar solution to vilva manggkhai above, only my upload interface looks like this:

Since it works off of drag and drop, rather than the browse/enter filepath system vilva showed, I can’t find any way of using css locators to find what I could target to send the file path to.

Upload.png


#30

@Alex

Any news on a possible release date for the fix/solution? :o :stuck_out_tongue:


#31

Fixes in version 3.5.6:


#32

Awesome! And an even better solution than calling AutoIT or whatever. Kudos!


#33

Alex said:

Fixes in version 3.5.6:

The Helper is working great.

I was a little confused at first, because I was checking it by clicking through a case manually and the type | locator | filepath - command did nothing. When running the test automatically though, it worked completely fine.


#34

Thank you for the feedback. Could you please give more details about the issue where the command did nothing?


#35

Alex said:

Thank you for the feedback. Could you please give more details about the issue where the command did nothing?

Hi Alex,

short video of what I mean:

https://drive.google.com/open?id=1liwt-3mJaEzOdAiYtT0DWjg-YaN-tkIF

When going through manually, the KR Helper won’t paste the filepath into the upload-dialogue.

When starting the case automatically, it works just fine.


#36

@2620-Alex

Just had a happy little accident using the KR Helper.

It’s not focusing on Firefox, but whatever window is activ.

So I just spammed our office chat with a couple dozens of filepaths while stepping away from my desk for a few minutes while running a case in the background. :smiley: o:)

I’m not versed in Java, but is it possible to have the Helper always focusing on Firefox?


#37

Thank you for the feedback. We will work on that next week.


#38

Hi, if we don’t know where is my file. It’s possible to get the current directory (directory of test) ?

thank you!


#39

Good afternoon! Tell me please, the correct team for uploading of files.

SNAG-0611.png


#40

Matthew Miyares said:

Had a similar solution to vilva manggkhai above, only my upload interface looks like this:

Since it works off of drag and drop, rather than the browse/enter filepath system vilva showed, I can’t find any way of using css locators to find what I could target to send the file path to.

Is there a solution to this? How will a drag-and-drop-to-upload be handled on Katalon Recorder?


#41

Vilva, drag and drop I am not sure is supported for operations such as file upload (there are various drag and drop commands, but they appear to be for moving one element on a page to over another). Katalon Studio by comparison likely would be able to support it.

I did notice however you have a “Choose a file” button present below your drag and drop option, I am guessing that if this is selected you can select a file using a file dialogue and thus use the methods listed here?