Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5819)

Unified Diff: chrome/test/webdriver/test/chromedriver_tests.py

Issue 7701010: Fix file uploads in chromedriver. It should not be assumed that multiple file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/test/chromedriver_tests.py
diff --git a/chrome/test/webdriver/test/chromedriver_tests.py b/chrome/test/webdriver/test/chromedriver_tests.py
index a8bd370298e42277ec43b32e501bd74dde396108..80f0af887c02055a46ea51fc9633fd2b58e8ff09 100644
--- a/chrome/test/webdriver/test/chromedriver_tests.py
+++ b/chrome/test/webdriver/test/chromedriver_tests.py
@@ -675,8 +675,7 @@ class FileUploadControlTest(ChromeDriverTest):
super(FileUploadControlTest, self).setUp()
self._driver = self.GetNewDriver()
- # See crbug.com/93909.
- def DISABLED_testSetFilePathToFileUploadControl(self):
+ def testSetFilePathToFileUploadControl(self):
"""Verify a file path is set to the file upload control."""
self._driver.get(GetTestDataUrl() + '/upload.html')
@@ -708,10 +707,9 @@ class FileUploadControlTest(ChromeDriverTest):
multiple = fileupload_single.get_attribute('multiple')
self.assertEqual('false', multiple)
self.assertRaises(WebDriverException, fileupload_single.send_keys,
- filepaths[0], filepaths[1], filepaths[2], filepaths[3])
+ '\n'.join(filepaths))
- # See crbug.com/93909.
- def DISABLED_testSetMultipleFilePathsToFileUploadControl(self):
+ def testSetMultipleFilePathsToFileUploadControl(self):
"""Verify multiple file paths are set to the file upload control."""
self._driver.get(GetTestDataUrl() + '/upload.html')
@@ -728,8 +726,7 @@ class FileUploadControlTest(ChromeDriverTest):
fileupload_multi = self._driver.find_element_by_name('fileupload_multi')
multiple = fileupload_multi.get_attribute('multiple')
self.assertEqual('true', multiple)
- fileupload_multi.send_keys(filepaths[0], filepaths[1], filepaths[2],
- filepaths[3])
+ fileupload_multi.send_keys('\n'.join(filepaths))
files_on_element = self._driver.execute_script(
'return document.getElementById("fileupload_multi").files;')

Powered by Google App Engine
This is Rietveld 408576698