OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/python | |
Nirnimesh
2011/08/01 19:21:24
Love this file
| |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 import pyauto_functional | |
7 import pyauto | |
8 | |
9 | |
10 class PyAutoWebDriverTest(pyauto.PyUITest): | |
11 """Tests PyAuto-WebDriver integration.""" | |
12 | |
13 def testCanOpenUrl(self): | |
14 """Navigate to about:blank with WebDriver.""" | |
15 driver = self.NewWebDriver() | |
16 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.
| |
17 | |
18 def testCanConnectToRestartedBrowser(self): | |
19 """Restart the browser and connect again with WebDriver.""" | |
20 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
| |
21 self.RestartBrowser() | |
22 driver = self.NewWebDriver() | |
23 self.assertEquals(1, driver.execute_script('return 1')) | |
24 | |
25 | |
26 if __name__ == '__main__': | |
27 pyauto_functional.Main() | |
OLD | NEW |