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

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

Issue 1799183002: [ChromeDriver] Add nested frame xpath expression in order to switch to frame present inside nested … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/test/chromedriver/window_commands.cc » ('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 ce3058ae1feb1b055b79cf9a06b18ca43b46cd24..b29ef73880296f9fcd954b74623d4ccfea73ca38 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -400,6 +400,21 @@ class ChromeDriverTest(ChromeDriverBaseTest):
self._driver.SwitchToParentFrame()
self.assertTrue('One' in self._driver.GetPageSource())
+ def testSwitchToNestedFrame(self):
+ self._driver.Load(self.GetHttpUrlForFile(
+ '/chromedriver/nested_frameset.html'))
+ self._driver.SwitchToFrameByIndex(0)
+ self.assertTrue(self._driver.FindElement("id", "link").IsDisplayed())
+ self._driver.SwitchToMainFrame()
+ self._driver.SwitchToFrame('2Frame')
+ self.assertTrue(self._driver.FindElement("id", "l1").IsDisplayed())
+ self._driver.SwitchToMainFrame()
+ self._driver.SwitchToFrame('fourth_frame')
+ self.assertTrue('One' in self._driver.GetPageSource())
+ self._driver.SwitchToMainFrame()
+ self._driver.SwitchToFrameByIndex(4)
+ self.assertTrue(self._driver.FindElement("id", "aa1").IsDisplayed())
+
def testExecuteInRemovedFrame(self):
self._driver.ExecuteScript(
'var frame = document.createElement("iframe");'
« no previous file with comments | « no previous file | chrome/test/chromedriver/window_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698