New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620367 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug


Sign in to add a comment

File upload mimetype validation fails in Chrome launched by Chromedriver

Project Member Reported by gmanikpure@chromium.org, Jun 15 2016

Issue description


What steps will reproduce the problem?

[A] Test case 1 :-
https://bugs.chromium.org/p/chromedriver/issues/detail?id=915

(1) Launch Chrome through Chromedriver
(2) Navigate to the attached FileUpload.html page
(3) Upload a valid .csv file by clicking on Choose field button.
(4) Click on Submit

WebDriver driver=new ChromeDriver();
driver.get("file:///path/to/FileUpload.html");
driver.findElement(By.id("grade_file")).sendKeys("/path/to/.csv file");
driver.findElement(By.tagName("form")).submit();

What is the expected output?
File should be uploaded successfully.

What do you see instead?
Error message 'Please enter a value with a valid mimetype' is displayed.

[B] Test case 2 :-
https://bugs.chromium.org/p/chromedriver/issues/detail?id=1391

(1) Launch Chrome through Chromedriver
(2) Navigate to the attached FolderUpload.html page
(3) Upload a folder (containing 1 or more than 1 files) by clicking on Choose Files button.

WebDriver driver=new ChromeDriver();
driver.get("file:///path/to/FolderUpload.html");
driver.findElement(By.id("uploadFolder")).sendKeys("/path/to/folder");

What is the expected output?
Folder should be uploaded successfully.

What do you see instead?
Folder is not uploaded. It can verified in Chrome dev console.
a) Press F12 to open dev console
b) Run command "document.getElementById('uploadFolder').files" in console.
=> It does not show the list of files of the uploaded folder.


Note - Above test cases works fine when performed manually (without chromedriver).
 
FileUpload.html
1.0 KB View Download
FolderUpload.html
133 bytes View Download
Blockedon: chromedriver:1391 chromedriver:915
Cc: samu...@chromium.org
Components: Platform>DevTools
Status: Available (was: Untriaged)
Labels: OS-All
Owner: lushnikov@chromium.org
Status: Assigned (was: Available)
I think we should do something similar to FileInputType::filesChosen, maybe just call |m_inputType->filesChosen()| with correct file list.
Cc: dgozman@chromium.org
Owner: einbinder@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 1 2016

Status: Fixed (was: Assigned)
Thanks for the fix!
Tested both the test cases , looks good.

Sign in to add a comment