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

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

Issue 12764021: [chromedriver] Support clicking an element in sub frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 9 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/chromedriver/run_py_tests.py
diff --git a/chrome/test/chromedriver/run_py_tests.py b/chrome/test/chromedriver/run_py_tests.py
index 64732b3b67ce67f45c3425039782206806d2c070..f6fbf560dc5d63a4c11355be392a01f363418a73 100755
--- a/chrome/test/chromedriver/run_py_tests.py
+++ b/chrome/test/chromedriver/run_py_tests.py
@@ -247,6 +247,14 @@ class ChromeDriverTest(ChromeDriverBaseTest):
div.Click()
self.assertEquals(1, len(self._driver.FindElements('tag name', 'br')))
+ def testClickElementInSubFrame(self):
+ self._driver.Load(self.GetHttpUrlForFile('/chromedriver/frame_test.html'))
+ frame = self._driver.FindElement('tag name', 'iframe')
+ self._driver.ExecuteScript('arguments[0].src = "empty.html";', frame)
kkania 2013/03/13 00:06:20 can you remove this now? optional, but you can che
chrisgao (Use stgao instead) 2013/03/13 00:36:48 Removed. It is not needed anymore.
+ self._driver.SwitchToFrame(frame)
+ # Test clicking element in the sub frame.
+ self.testClickElement()
+
def testClearElement(self):
text = self._driver.ExecuteScript(
'document.body.innerHTML = \'<input type="text" value="abc">\';'

Powered by Google App Engine
This is Rietveld 408576698