<s> from po import selectors_page <EOL> import unittest <EOL> from nose . tools import raises <EOL> from robotpageobjects . exceptions import SelectorError <EOL> class FindElementsTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . page = selectors_page . Page ( ) <EOL> self . page . open ( ) <EOL> def test_find_elements ( self ) : <EOL> self . assertEqual ( len ( self . page . find_elements ( "<STR_LIT>" ) ) , <NUM_LIT:1> , "<STR_LIT>" ) <EOL> def test_find_element ( self ) : <EOL> failed = False <EOL> try : <EOL> self . page . find_element ( "<STR_LIT>" ) <EOL> except ValueError : <EOL> failed = True <EOL> self . assertFalse ( failed , "<STR_LIT>" ) <EOL> @ raises ( SelectorError ) <EOL> def test_find_element_multiple ( self ) : <EOL> self . page . find_element ( "<STR_LIT>" ) <EOL> def test_find_element_webelement ( self ) : <EOL> element_found_by_selector = self . page . find_element ( "<STR_LIT>" ) <EOL> self . page . click_element ( element_found_by_selector ) <EOL> self . page . location_should_be ( "<STR_LIT>" ) <EOL> def tearDown ( self ) : <EOL> self . page . close ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
