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?
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)
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)
@door.benzvi Sorry, but I am having the exact same issue, and I do not seem to be successful picking neither the xpath to my ‘drop target’ nor the parent thereof.
Getting this ErrMsg thrown:
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
DIV2
Searched by XPATH://div[1]/div[1]/div[3]/div[2]/div/div/div[1]/div/div/div
Have you tried using the element explorer to find the input element locator?
From the error message I can see that you are trying to upload a file, not to a type=file element.
Well, it seems our devs have generated a ‘drop target’ instead and it works a bit differently, obviously.
I’ll investigate here – and possibly be back.
Are you saying or ‘drop target field’ should be a type=file element?