~ya-bo-ng/juju-gui/bottom-bar-removed

« back to all changes in this revision

Viewing changes to docs/browser-testing.rst

  • Committer: Nicola Larosa
  • Date: 2013-05-24 14:10:58 UTC
  • mto: This revision was merged to the branch mainline in revision 689.
  • Revision ID: nicola.larosa@canonical.com-20130524141058-d1udvhh2j801dxpu
Review main docs and doc comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _browser-testing:
 
2
 
1
3
===============
2
4
Browser Testing
3
5
===============
84
86
driver set up.  Tests defined in subclasses can take advantage of several
85
87
already defined attributes and methods, including:
86
88
 
87
 
- self.driver: the active Selenium web driver;
88
 
- self.app_url: the Juju GUI URL;
89
 
- self.load(path='/'): ask the web driver to load the given page;
90
 
- self.wait_for(condition, error, timeout): wait for some condition to become
91
 
  true;
92
 
- self.handle_browser_warning(): overstep the browser warning dialog if the
 
89
- ``self.driver``: the active Selenium web driver;
 
90
- ``self.app_url``: the Juju GUI URL;
 
91
- ``self.load(path='/')``: ask the web driver to load the given page;
 
92
- ``self.wait_for(condition, error, timeout)``: wait for some condition to
 
93
    become true;
 
94
- ``self.handle_browser_warning()``: overstep the browser warning dialog if the
93
95
  current browser is not supported;
94
 
- self.restart_api(): restart the staging API backend, so that the default
 
96
- ``self.restart_api()``: restart the staging API backend, so that the default
95
97
  environment is restored.
96
98
 
97
99
The last of the methods above is particularly important: tests modifying the