annotate _ui_tests/driver_register.py @ 2915:0b30aa1fa138

fixes #496 Password checker bypassed when user resets password
author Yask Srivastava <yask123@gmail.com>
date Sat, 28 Feb 2015 23:58:11 -0800
parents 384555088cab
children
rev   line source
1782
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
1 # Copyright: 2012 MoinMoin:HughPerkins
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
2 # License: GNU GPL v3 (or any later version), see LICENSE.txt for details.
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
3
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
4 """
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
5 This module is used to register the webdriver driver module as a global
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
6 variable, so that it can be used by conftest methods, eg for doing a
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
7 printscreen when a test fails
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
8 """
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
9
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
10 driver = None
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
11
1975
384555088cab lots of pep8 fixes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1782
diff changeset
12
1782
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
13 def register_driver(driver_):
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
14 """
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
15 set the driver global variable to driver_
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
16 """
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
17 global driver
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
18 driver = driver_
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
19
1975
384555088cab lots of pep8 fixes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1782
diff changeset
20
1782
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
21 def get_driver():
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
22 """
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
23 get the value of the driver global variable
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
24 """
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
25 global driver
f87d2e646c60 created a first selenium test, specifically of adding subitems
Hugh Perkins <hughperkins@gmail.com>
parents:
diff changeset
26 return driver