Back to index

plone3  3.1.7
Classes | Functions | Variables
kss.demo.selenium_utils.seleniumtestcase Namespace Reference

Classes

class  SeleniumTestCase

Functions

def trymanytimes

Variables

list browser = os.environ["SELENIUMBROWSER"]
list target = os.environ["SELENIUMTARGET"]

Function Documentation

Decorate a test method with this to make it try for ten seconds

Definition at line 16 of file seleniumtestcase.py.

00016 
00017 def trymanytimes(func):
00018     '''Decorate a test method with this to make it try for ten seconds'''
00019     def newfunc(*args, **kwargs):
00020         exc = None
00021         for i in range(10):
00022             try:
00023                 func(*args, **kwargs)
00024             except Exception, e:
00025                 exc = e
00026                 time.sleep(1)
00027             else:
00028                 return
00029         raise exc
00030     return newfunc


Variable Documentation

string kss.demo.selenium_utils.seleniumtestcase.browser = os.environ["SELENIUMBROWSER"]

Definition at line 7 of file seleniumtestcase.py.

string kss.demo.selenium_utils.seleniumtestcase.target = os.environ["SELENIUMTARGET"]

Definition at line 11 of file seleniumtestcase.py.