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

Unified Diff: chrome/test/functional/pyauto_webdriver.py

Issue 7523060: Let pyauto create an attached webdriver instance to manipulate web pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move bools into struct Created 9 years, 5 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/functional/pyauto_webdriver.py
diff --git a/chrome/test/functional/pyauto_webdriver.py b/chrome/test/functional/pyauto_webdriver.py
new file mode 100644
index 0000000000000000000000000000000000000000..ddc9930b87de080885b05436a6922e36615b347e
--- /dev/null
+++ b/chrome/test/functional/pyauto_webdriver.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
Nirnimesh 2011/08/01 19:21:24 Love this file
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import pyauto_functional
+import pyauto
+
+
+class PyAutoWebDriverTest(pyauto.PyUITest):
+ """Tests PyAuto-WebDriver integration."""
+
+ def testCanOpenUrl(self):
+ """Navigate to about:blank with WebDriver."""
+ driver = self.NewWebDriver()
+ self.assertEquals(1, driver.execute_script('return 1'))
Nirnimesh 2011/08/01 19:21:24 Could you have it do something more webdriver-y? m
kkania 2011/08/02 15:10:44 Changed to get title. Are you concerned that othe
Nirnimesh 2011/08/02 18:07:13 I wanted a real hello-world example. 'return 1' ju
kkania 2011/08/02 23:19:19 Done.
+
+ def testCanConnectToRestartedBrowser(self):
+ """Restart the browser and connect again with WebDriver."""
+ driver = self.NewWebDriver()
Nirnimesh 2011/08/01 19:21:24 driver.Stop()?
kkania 2011/08/02 15:10:44 this isn't necessary, since pyauto controls the br
+ self.RestartBrowser()
+ driver = self.NewWebDriver()
+ self.assertEquals(1, driver.execute_script('return 1'))
+
+
+if __name__ == '__main__':
+ pyauto_functional.Main()

Powered by Google App Engine
This is Rietveld 408576698