Chromium Code Reviews| Index: chrome/test/webdriver/chromedriver_tests.py |
| diff --git a/chrome/test/webdriver/chromedriver_tests.py b/chrome/test/webdriver/chromedriver_tests.py |
| index 94f15928e52866fc34e6044da3164ef9520670f3..a218211c1e743665e2094a3087efa47c393002d3 100755 |
| --- a/chrome/test/webdriver/chromedriver_tests.py |
| +++ b/chrome/test/webdriver/chromedriver_tests.py |
| @@ -290,7 +290,7 @@ class CookieTest(unittest.TestCase): |
| cookie_dict = None |
| cookie_dict = self._driver.get_cookie("chromedriver_cookie_test") |
| cookie_dict = {} |
| - cookie_dict["name"]= "chromedriver_cookie_test" |
| + cookie_dict["name"] = "chromedriver_cookie_test" |
| cookie_dict["value"] = "this is a test" |
| self._driver.add_cookie(cookie_dict) |
| cookie_dict = self._driver.get_cookie("chromedriver_cookie_test") |
| @@ -596,6 +596,28 @@ class AutofillTest(unittest.TestCase): |
| 'Saved CC line item not same as what was entered.') |
| +class FileUploadControlTest(unittest.TestCase): |
| + """Tests dealing with file upload control.""" |
| + |
| + def setUp(self): |
| + self._launcher = ChromeDriverLauncher(root_path=os.path.dirname(__file__)) |
| + self._driver = WebDriver(self._launcher.GetURL(), |
| + DesiredCapabilities.CHROME) |
| + |
| + def tearDown(self): |
| + self._driver.quit() |
| + self._launcher.Kill() |
| + |
| + def testSetFilePathToFileUploadControl(self): |
| + """Verify a file path is set to the file upload control.""" |
| + self._driver.get(self._launcher.GetURL() + '/upload.html') |
| + |
| + f = self._driver.find_element_by_name('fileupload') |
| + f.send_keys('upload.html') |
| + path = f.value |
| + self.assertTrue(path.endswith('upload.html')) |
|
kkania
2011/06/01 16:16:41
can you also have a test for multiple files? Or is
nodchip
2011/06/02 07:15:53
Done.
|
| + |
| + |
| if __name__ == '__main__': |
| unittest.main(module='chromedriver_tests', |
| testRunner=GTestTextTestRunner(verbosity=1)) |