-
Notifications
You must be signed in to change notification settings - Fork 24
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 (test "#type -> file upload") doesn't work locally #51
Comments
I found the root cause. By default, leadfoot detects But in case of local upload, you have to skip the whole archiving / base64 part and behave like filename is a simple string. In this case chromedriver (or any other normal driver) will detect the file locally and process it properly. So, disabling this block https://github.com/theintern/leadfoot/blob/master/Element.js#L196 for local upload solves the issue. What is the best option to do it? Is there any way to detect remote vs. local driver? If not - what is the best way to provide additional configuration option, something like |
Hmmmmmm. That’s quite odd. When the file is uploaded to Selenium it is unpacked into a temporary directory so it shouldn’t matter whether it is remote or not. When I tested this functionality I was actually using an SSH tunnel between two systems, so while the filesystems were separate, they both appeared to be local to the other, even though they were not. So, I am not totally sure offhand how the mechanism would ever fail in the case you’re describing. Actually, the feature detection verifies that the server returns a path with the expected filename in it, so I am really not sure how it would fail. |
To answer your last questions, making feature detection tests in https://github.com/theintern/leadfoot/blob/master/Server.js#L329 not run if values were explicitly defined for those features in desiredCapabilities might be the best way to go, then anything can be overridden by anyone. As a user, you could also just disable feature detection entirely by setting |
Regarding your other answer, I've tried to use |
So, if you could just reproduce my steps locally you'll see that currently leadfoot is broken. We have to disable |
And if the file gets uploaded, it becomes presented wherever the server is, no matter whether it is on the same machine or not. All of the things you reference before from Selenium code are not relevant to this because The actual bug is that the |
Sorry, I think I assumed too much based on the codebase instead of actual debugging. My bad. I can confirm the loop, yes. I attempted to do the fix, I replaced
with
is that what you mean? It still doesn't work for me. |
You’ll need to |
Fixed in #55, as you suggested. |
I'm running "#type -> file upload" test from Element.js suite. It works when I run it with browserstack, but it doesn't work locally.
Steps to reproduce:
brew install chromedriver
)chromedriver --port=4444 --url-base=wd/hub &
)tunnel: 'BrowserStackTunnel'
withtunnel: 'NullTunnel'
Expected output: successful test
Actual output:
So, nothing happens. I tried to increase different timeouts - didn't help.
Additional details:
OS X 10.10.4
ChromeDriver 2.17.340128 (994135a3538dd99439ef22cea8a9b098e00d8eb4)
Chrome 44.0.2403.157
Leadfoot: master branch
The text was updated successfully, but these errors were encountered: