TestProject Forum

Issue with file upload button

Hello testproject.io,

I am trying to upload a file from my local machine using the ‘Upload file’ addons. It seems like xpath = //input[@type = ‘file’] isn’t working for me. The upload button in our application doesn’t seem to have this xpath. Could you please help me with this?

Testproject step:

Error: Message

Unable to find an input element with type of ‘file’

Thanks,
Puja

Hi @pujas,

Please try to hover over the input element → Press double shift → Choose upload file:

Then, paste the path to the file there and try again.

image

Thanks @dor.benzvi for the quick response.
I tried the steps mentioned by you. And am getting the following error:
Message

java.util.concurrent.ExecutionException: io.testproject.java.sdk.v2.exceptions.FailureException: Element must have the ‘type=file’ attribute!
Caused by io.testproject.java.sdk.v2.exceptions.FailureException: Element must have the ‘type=file’ attribute! at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)

Element

I

Searched by XPATH://i

My upload button does not have input type as file. I guess that might be causing the problem?

Thanks,
Puja

Hi @pujas,

Can you hover over the input element → Press double shift → Click on the parent element icon and upload the screenshot here:

@dor.benzvi ^^

@pujas Before opening this window.
Can you hover over the element that triggers this popup and try to add the action to it?

@dor.benzvi

@pujas
Can send me a message on the chat?
We can make a Zoom session to find a solution for that.

@dor.benzvi Pinged you here…is this the correct place to reach out to you? :smiley:

Thanks for your help @dor.benzvi . The issue is resolved now after the session we had. (We just had to search for the ‘input element’ using testproject’s explorer)