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

Unified Diff: chrome/test/webdriver/chromedriver_tests.py

Issue 5572001: Send screenshots back to the client for debugging (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed nit Created 9 years, 10 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/webdriver/chromedriver_tests.py
diff --git a/chrome/test/webdriver/chromedriver_tests.py b/chrome/test/webdriver/chromedriver_tests.py
index c7d7b205af62b626fd6d2d5a204c5bc6ac9f57a3..be4bfa18300d185f0c188dd78008b4f9a861e4ec 100755
--- a/chrome/test/webdriver/chromedriver_tests.py
+++ b/chrome/test/webdriver/chromedriver_tests.py
@@ -116,6 +116,29 @@ class BasicTest(unittest.TestCase):
launcher.Kill()
+class ScreenshotTest(unittest.TestCase):
+ """Tests to verify screenshot retrieval"""
+
+ SEARCH = "http://www.google.com/webhp?hl=en"
+ NEWS = "http://www.google.com/news"
+
+ def setUp(self):
+ self._launcher = ChromeDriverLauncher()
+ self._driver = WebDriver(self._launcher.GetURL(), 'chrome', 'any')
+
+ def tearDown(self):
+ self._driver.quit()
+ self._launcher.Kill()
+
+ def testScreenCapture
kkania 2011/03/07 18:15:17 there are a lot of errors in this script; please f
Joe 2011/03/11 22:12:48 refreshed On 2011/03/07 18:15:17, kkania wrote:
+ self._driver_.get(self.EARCH)
+ s1 = self._driver.get_screenshot_as_base64()
+ self._driver.get(self.NEWS)
+ s2 = self._driver.get_screenshot_as_base64()
+ self.assertTrue(len(s1) > 0 && (len)s2 > 0)
+ self.assertTrue(len(s1) != len(s2))
+
+
class CookieTest(unittest.TestCase):
"""Cookie test for the json webdriver protocol"""

Powered by Google App Engine
This is Rietveld 408576698