Very Urgent : How use Webui.uploadfile

How must I use the webui.uploadfile

all seems ok but the file is not upload

1 Like

How do you know it? — it may be perfectly obvious to you, but nobody else can see it. So it’s too difficult to understand you.

any errors logged for upload failure?

I havent errors

I test with a test object with a web element I look in in the firefox console …

but without result…

Because if the file is upload Odoo display another page

and nothing append…

it’s difficult to describe an error when I haven’t error…

So I think that it’s me that I use not correctly this function
if we look the katalon the uploadfile is in italic

The latest version of Firefox browser is 133.0.3.

On the other hand, you seem to be using FIrefox 128.0.

image

Do you want to use an old version browser? Are you sure? It is a difficult thing to do.

Your test case script includes a lot of statements that call WebUI.click keyword.

However, the output includes no log of executing WebUI.click keyword.

It seems that you failed to perform WebUI.click as well; not only WebUI.uploadFile. I suppose that your test case scritp failed to connect with the old version Firefox. So your test did not interact with the browser at all.

I guess, you should update Firefox browser and the WebDriver for Firefox to the latest version.

Also, how about before every “click”, you add a “wait” statement:

TestObjectDin.addProperty('xpath', ...)
WebUI.waitForElementVisible(TestObjectDin, 10)
WebUI.click(TestObjectDin)

It looks like you’re trying to use upload file against a button. You need to use it with an input object. Have a look at your page source again and look for a suitable element (with input tag)

1 Like

Ah, this document is poorly written. The doc shows the following sample code:

'Upload test-photo.png to input_browse'
WebUI.uploadFile(findTestObject('input_browse'), 'D:\\test-photo.png')

The input_browse test object — what does it point to? An <button> or <input> element? — the document describes nothing.

No wonder why @adecaest got confused.

1 Like

It seems that “uploadFile” is not the correct command to use. If you can tell us the manual method to upload your file, then we may be able to assist you in your coding.