question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

upload file multiple time failed on (chrome) x (linux, win10) via selenium grid

See original GitHub issue

What is your Test Scenario?

Call upload file multiple time.

What is the Current behavior?

It’s OK using testcafe 1.1.0, but after we upgrade testcafe to 1.3.2, it’s success to upload first file, but nothing is triggered when uploading second file.

It only happen on (chrome) x (linux, win10), but it works well on mac.

What is the Expected behavior?

Second file should also upload successfully.

What is your web application and your TestCafe test code?

Your website URL (or attach your complete example): Internal app

Your complete test code (or attach your test files):
await t.setFilesToUpload(uploadFileInput, filesPath);
Your complete configuration file (if any):

Your complete test report:

Screenshots:

Steps to Reproduce:

  1. Go to my website …
  2. Execute this command…
  3. See the error…

Your Environment details:

  • testcafe version: 1.3.2
  • node.js version: 10.9.0
  • command-line arguments: testcafe selenium:chrome *.js
  • browser name and version: Chrome 74, 75
  • platform and version: win10, linux(docker)
  • other:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
link89commented, Aug 9, 2019

I think I have already find the root cause:

https://github.com/DevExpress/testcafe-hammerhead/blob/75a3b5878bef3659ae9d6b2bf9713ba0cfb83fd4/src/client/sandbox/upload/index.ts#L106-L132

If I make _shouldRaiseChangeEvent always return true, the bug is gone. I guess the condition file.name === currentFile.name is incorrect. As the first file we upload is 1.txt, and the second file is upload/1.txt, in this case the change event should be thrown.

What our case test is upload different files with same name, so this bug will be triggered. But since you guys have exclude mac, that’s why we only found this happen on windows and linux.

I think you should double check this fix https://github.com/DevExpress/testcafe/issues/1844 as it introduce a new bug. It’s impossible for hammerhead to read the full path, so I think you should add a new argument to setFilesToUpload to allow user to decide whether a change event should be fired when they call it.

0reactions
github-actions[bot]commented, Oct 9, 2021

We’re closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to upload a file when using selenium Grid
I have a scenario, where i have to upload a file using Chrome browser from Node. The file is located in the Resource...
Read more >
How To Upload And Download A File Using Selenium
Do you know how to upload and download a file in Selenium ? Watch this video to learn how to upload and download...
Read more >
How To Download & Upload Files Using Selenium With Java
In this Selenium Java tutorial, I am going to highlight different ways through which you can download or upload files in Selenium WebDriver....
Read more >
Error forwarding the new session Error forwarding the request ...
We are running selenium tests against Chrome 46 on Selenium grid and we got the below error frequently: Exception in thread "main" org.openqa.selenium....
Read more >
2024 - Issue in Multiple file upload in selenium grid - Monorail
In the latest version of ChromeDriver v2.32, we added error check for the existence of the file for uploading (as required by the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found