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

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

Issue 2620803002: [chromedriver] Use nodeType instead of instanceof. (Closed)
Patch Set: Created 3 years, 11 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/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 3d48c3df3b72e1719d820253f004ac4be11e356b..cd47d33dccca1b8436ed2391b8ae7804d8c315d1 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -1372,6 +1372,13 @@ class ChromeDriverTest(ChromeDriverBaseTestWithWebServer):
if (self._driver.w3c_compliant):
self.assertEquals(len(element._id), w3c_id_length)
+ def testFindElementWhenElementIsOverridden(self):
+ self._driver.Load('about:blank')
+ self._driver.ExecuteScript(
+ 'document.body.appendChild(document.createElement("a"));')
+ self._driver.ExecuteScript('window.Element = {}')
+ self.assertEquals(1, len(self._driver.FindElements('tag name', 'a')))
+
class ChromeDriverPageLoadTimeoutTest(ChromeDriverBaseTestWithWebServer):
« chrome/test/chromedriver/js/call_function.js ('K') | « chrome/test/chromedriver/js/call_function.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698