WebElement uploadInput = browser.findElementByXPath("[correct_identifier]");
uploadInput.sendKeys(elementPath);
The script successfully initiates the file upload process, however, the custom JavaScript loading screen persists and fails to disappear as expected.
Typically, when manually uploading a file, it takes approximately 5 seconds for the entire process to complete. Using webdriver
, the loading screen continues to display indefinitely, triggering a timeout
error regardless of the delay.
Additional details: On firefox
, pressing keys has no effect on the upload. Conversely, only on chrome
does the upload commence and finalize (with a visible completion indicator), yet the post-processing loading screen remains unresolved, preventing further actions on the page.
The HTML element responsible for the upload appears like this:
<span class="[classes]">
<a href="#" class="[classes]" style="float: right; display: none;"> Cancel</a>
<input id="[id]" class="multi_file_upload single" type="file" name="filedata" multiple="" data-path="[path]">
</span>