webdriver.dart
webdriver.dart copied to clipboard
Unable to upload files to remote WebDrivers
We are not able to upload files on file input elements on remote services like Sauce Labs. This is normally done by sending keys to the element. The Dart client doesn't appear to upload the file to remote services first like the others do. Python Example
If the keys being sent to an element are found to be a path that points to a local file, the file is upload to the WebDriver with a POST request to /session/$sessionId/file
, and the response to that request is what's actually sent to the element.
- Dart version: 1.9.0-dev.8.0
- OS: OS X 10.10.3
- Dart webdriver version: 0.9.1
+1
I actually really hate how the Selenium clients overload sendKeys for this.
What I would prefer is that a WebElement.uploadFile(File file) method is added that uploads the file and sends the appropriate keys to the element. The code for such a method is not that complicated, except that Selenium is expecting the sent file to be a zip file, and last time I looked there wasn't a zip file library for Dart.
last time I looked there wasn't a zip file library for Dart.
I've not used it, but it looks to have a ZIP encoder: https://github.com/brendan-duncan/archive