Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Upload issue #1960

Closed
mansiKulkarni39 opened this issue Feb 18, 2020 · 3 comments
Closed

File Upload issue #1960

mansiKulkarni39 opened this issue Feb 18, 2020 · 3 comments

Comments

@mansiKulkarni39
Copy link

Hi,
I am using upload(fileName).to(uploadFileButton) to upload the file. Also I am passing fileName as "src\test\resources\TestUpload\HeroListToUpload.csv" and correct element of uploadFileButton(verified by using onclick, it is opening window's pop up).
But I am getting "net.thucydides.core.pages.components.FileToUploadCouldNotBeFoundException: File not found: /Users/abc/eclipse-workspace/OProject/Open/src\test\resources\TestUpload\HeroListToUpload.csv"

I have tried many things but it is not working.

Below are versions I used in pom.xml
<serenity.version>2.0.90</serenity.version>
<serenity.maven.version>2.0.90</serenity.maven.version>
<serenity.cucumber.version>1.9.50</serenity.cucumber.version>

Please let me know.
Note: I haven't use screenplay in my project so for consistency not using it for upload file too.

@wakaleo
Copy link
Member

wakaleo commented Feb 19, 2020

FileToUploadCouldNotBeFoundException means what it says: it can't find a file with that path. Try with forward-slashes "/" and make sure the file does indeed exist.

@mansiKulkarni39
Copy link
Author

Even after changing to "/" it is not working, it is giving error as "org.openqa.selenium.ElementNotInteractableException: element not interactable". But I am able to do just click on same element which I used for upload.

@wakaleo
Copy link
Member

wakaleo commented Feb 20, 2020

That's a Selenium issue - the element is not interactable. Your locator might not be locating the element you think it is.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants