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

Unified Diff: chrome/test/chromedriver/test/run_py_tests.py

Issue 2302803004: [chromedriver] Set |key| when calling Input.dispatchKeyEvent. (Closed)
Patch Set: dont set key if keycode conversion doesnt return anything (this happens for char events, for exampl… Created 4 years, 3 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
« no previous file with comments | « chrome/test/chromedriver/client/chromedriver.py ('k') | chrome/test/data/chromedriver/two_inputs.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/test/run_py_tests.py
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index f7fd8521a6927281b1e4dc9343f589caf5c93bdd..0613e5aa7f02247628be25ca6c5422da2369aa3d 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -584,6 +584,19 @@ class ChromeDriverTest(ChromeDriverBaseTestWithWebServer):
value = self._driver.ExecuteScript('return arguments[0].value;', text)
self.assertEquals('0123456789+-*/ Hi, there!', value)
+ def testSendingTabKeyMovesToNextInputElement(self):
+ self._driver.Load(self.GetHttpUrlForFile('/chromedriver/two_inputs.html'))
+ first = self._driver.FindElement('id', 'first')
+ second = self._driver.FindElement('id', 'second')
+ first.Click()
+ self._driver.SendKeys('snoopy')
+ self._driver.SendKeys(u'\uE004')
+ self._driver.SendKeys('prickly pete')
+ self.assertEquals('snoopy', self._driver.ExecuteScript(
+ 'return arguments[0].value;', first))
+ self.assertEquals('prickly pete', self._driver.ExecuteScript(
+ 'return arguments[0].value;', second))
+
def testGetElementAttribute(self):
self._driver.Load(self.GetHttpUrlForFile(
'/chromedriver/attribute_colon_test.html'))
« no previous file with comments | « chrome/test/chromedriver/client/chromedriver.py ('k') | chrome/test/data/chromedriver/two_inputs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698