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

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

Issue 11639019: [chromedriver] Implement SwitchToFrame command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/chromedriver.py
diff --git a/chrome/test/chromedriver/chromedriver.py b/chrome/test/chromedriver/chromedriver.py
index fb52ffe85df01a5d1e9795caca491b27d3f78c15..f2922db0008ec6da661bc5a858b02e3644ad76f9 100644
--- a/chrome/test/chromedriver/chromedriver.py
+++ b/chrome/test/chromedriver/chromedriver.py
@@ -75,6 +75,15 @@ class ChromeDriver(object):
return self._ExecuteSessionCommand(
'executeScript', {'script': script, 'args': args})
+ def SwitchToFrame(self, id_or_name):
+ self._ExecuteSessionCommand('switchToFrame', {'id': id_or_name})
+
+ def SwitchToFrameByIndex(self, index):
+ self.SwitchToFrame(index)
+
+ def SwitchToMainFrame(self):
+ self.SwitchToFrame(None)
+
def Quit(self):
"""Quits the browser and ends the session."""
self._ExecuteSessionCommand('quit')

Powered by Google App Engine
This is Rietveld 408576698