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
-
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_not_in_view
()[source]¶ This test ensure the box can be clicked even if it is not initially in the viewable screen area
-
test_find_element_by_link_text
()[source]¶ Tests that the browser can find an element using a partial link text.
-
test_find_element_by_partial_link_text
()[source]¶ 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.
Tests that the browser navigates to a page.
-
classmethod