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

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

Issue 11746025: [chromedriver]Implement command: title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 12 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.py
diff --git a/chrome/test/chromedriver/test.py b/chrome/test/chromedriver/test.py
index e8fe41dbaf3646e73ef892af9f8ff5963d849c47..247f4208eb507167acf319faba0a74b52d49a65a 100644
--- a/chrome/test/chromedriver/test.py
+++ b/chrome/test/chromedriver/test.py
@@ -45,6 +45,14 @@ class ChromeDriverTest(unittest.TestCase):
driver.ExecuteScript, '{{{')
driver.Quit()
+ def testGetTitle(self):
+ driver = chromedriver.ChromeDriver(_CHROMEDRIVER_LIB, _CHROME_BINARY)
+ driver.Load('http://www.google.com/webhp?hl=en')
kkania 2013/01/04 04:35:34 don't use real pages in tests; use a test page
chrisgao (Use stgao instead) 2013/01/05 01:19:09 Done.
+ import time
kkania 2013/01/04 04:35:34 don't sleep in tests; that leads to slower tests o
chrisgao (Use stgao instead) 2013/01/05 01:19:09 Done.
+ time.sleep(5)
+ self.assertEqual('Google', driver.GetTitle())
+ driver.Quit()
+
if __name__ == '__main__':
if len(sys.argv) != 2 and len(sys.argv) != 3:
« chrome/test/chromedriver/commands.cc ('K') | « chrome/test/chromedriver/commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698