tests package

Submodules

tests.browser_tests module

class tests.browser_tests.BrowserDriverTests(methodName='runTest')[source]

Bases: unittest2.case.TestCase

classmethod log_directory(create_not_found=True)[source]

Returns the directory where the log file should be stored

create_not_found being True will create the directory if it doesn’t exist

setUp()[source]

Hook method for setting up the test fixture before exercising it.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

tearDown()[source]

A set of actions to be used by all unittest2.TestCase.tearDown() methods. This will enable functionality such as leaving the browser open if the test failed (and we are running with the browser visible). This is a clean-up method to standardize across all tests.

Args:
test_case is an instance of unittest2.TestCase
Example:
class myTests(unitests2.TestCase):
def tearDown(self):
helper_selenium_functions.py.tear_down(self)
test_browser_Firefox()[source]

Test that a Firefox browser can be used. Test the name is not case sensitive.

test_checkboxes()[source]

Ensures checking a box, unchecking it, and toggling the state work as expected.

test_click_element()[source]

This test ensures that the mouse clicks on a given element

test_click_not_in_view()[source]

This test ensure the box can be clicked even if it is not initially in the viewable screen area

test_click_to_new_page()[source]

This test will click a link and wait for the page to load.

test_find_element_by_id()[source]

Tests that the browser can find an element using an id value.

Tests that the browser can find an element using a partial link text.

Tests that the browser can find an element using a partial link text.

test_find_element_by_xpath()[source]

Tests that the browser can find an element using an xPath statement.

test_navigate()[source]

Tests that the browser navigates to a page.

test_send_keys()[source]

This test ensures the class can send keys to a text box