Index: chrome/test/chromedriver/chromedriver.py |
diff --git a/chrome/test/chromedriver/chromedriver.py b/chrome/test/chromedriver/chromedriver.py |
index acb644581bc33600532b7f0f5d167a99e950ebb3..97793e86f550b13482bebcc127fd5478baf5c2ce 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') |