Upload error Katalon Recorder

Before, during my tests, I was able to upload files stored in the drive, but I can no longer do so even though nothing has changed on my end.

*Steps to reproduce
type | id = kml_file | ${path}

*Expected Results

upload a file

*Actual Results

Error

*Screenshots / Videos

*Blocker?
Yes


*Operating System
Windows 11

*Katalon Recorder version
version 7.1.0

*Katalon Recorder logs

Sometimes I get this error message:
[error] error - If you are using Firefox, please check if Katalon Recorder helper has started.

Other times I get this when it manages to upload the file:

[error] TypeError: Cannot read properties of undefined (reading ‘match’)

Environment (for Web Testing)
Google Chrome Version 147.0.7727.56 (Official Build) (64-bit)

Thank you

2 Likes

Hi there, and thanks for posting in the Katalon community! :hugs:

Working with recording, we encourage you trying Katalon Web Recorder Plus: Katalon Web Recorder Plus | Katalon Docs. Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,
Elly Tran

Let me bring some help @athul.kannan, our solution engineer might be able to provide some assistance.

hi @sing.sekou

seems this is a known issue in newer versions of Katalon Recorder (v7+) where the type command fails on file inputs, often throwing that specific match error.

Here are two fixes to try:

  1. Use sendKeys instead of type:
    The type command often conflicts with file input security restrictions. Switching to sendKeys usually bypasses this.
sendKeys | id=kml_file | ${path}
  1. Fix the Path Format:
    If you are on Windows, Katalon can be picky about backslashes. Change any backslashes (\) in your path variable to forward slashes (/).
  • Bad: C:\Users\Name\file.txt
  • Good: C:/Users/Name/file.txt

give sendKeys a shot first, it resolves most file upload glitches in the Chrome extension.

1 Like

Thank you for your response, but with sendKeys, I get this error message: \[error\] Element is not currently interactable and may not be manipulated

image

So I changed the simple “\” to “/”, and the routine is now able to properly set the name

image

but I’m getting the error

Check for Flakiness of locator where you attach file, You can always look manually where file get stored and write code in script to perfrom same action. You can share details and will surely help you out. Some modern language build component on the fly and give dynamic ids which causes issue.

Hello, my script looks a bit like this

When I record my actions, Katalon adds this line

type | id=kml_file | C:\fakepath\i-0275f9e30b56a6656.kml

while the file is actually located here: C:/Users/user01/Test/Tests - KML/i-0275f9e30b56a6656.kml.

And when I replay the script created by the recording, it crashes.

I just noticed this error for the first time myself.

I noticed that Chrome initially asked for permission to access local devices etc at the point it went to execute the type command, for the file input.

This command has worked for years with this site, thousands of times, so I am certain the selector is fine, and the command should work. I can only guess that the current version of Chrome has introduced new security measures tripping up Katalon Recorder.

The error confuses Katalon Recorder, as highlighted in the screenshot in the top post, re:

[error] error - If you are using Firefox, please check if Katalon Recorder helper has started.

I am using Chrome Version 147.0.7727.56 on macOS (Sequoia), but haven’t tried older builds of Chrome for comparative purposes, but given the build of KAR hasn’t changed in ages, but the Chrome build has, this to me clearly points to it being a new compatibility issue.

FWIW I double checked that allow local file access is still enabled for the Chrome extension. Also, when keeping the same selector but swapping out type for click, it opened up a file selector successfully, which confirms it’s interacting with the correct element.

Update: This is the only logging surfaced in the console (via devtools) for KAR when executing the commands

1 Like

You are not alone.

Katalon changed the URL of authorization
from https://testops.katalon.io/
to https://ac-xxxxxxx.katalon.io/project/xxxxxxx/
without explicit notice to users.

See Invalid TestOps Credentials and Cannot get Organization ID - #13 by stevio052002

2 Likes

I can’t help but wonder if it’s a cascading error in this case. In theory, the error should be unrelated to this failure, but changing the URI of a resource it expects to be able to communicate with might have a knock on effect, too. The timeline between this error appearing and that change also feels like more than just coincidence.

FWIW I have also explored the sendKeys way, but what it solidly confirmed is that there’s no way that will work, as Chrome’s security restrictions prevent an extension programmatically specifying the path for a file to be uploaded this way.

Thus it generated this error:

[error] Failed to set the ‘value’ property on ‘HTMLInputElement’: This input element accepts a filename, which may only be programmatically set to the empty string.

Best available remedy is

  1. Downgrade Chrome to a stable version that existed during Recorder 7.1.0 release
  2. Never reuse recorded C:\fakepath
    Always replace with a real absolute path: sendKeys | id=kml_file | C:/Users/user01/Test/Tests - KML/file.kml
  3. Never use type command as this known limitation of Recorder v7+.
    Use : sendKeys

Out of curiosity, was this response created via an Ai chatbot?