def test_wrapper_returns_None_in_silent_mode(self):
     mocked_driver = mock.Mock(WebDriver)
     mocked_driver.find_element_by_id.side_effect = TimeoutException
     driver = SeleniumWrapper(mocked_driver)
     self.assertRaises(NoSuchElementException, driver.by_id, 'hoge')
     driver.silent = True
     self.assertIsNone(driver.by_id('hoge'))
 def test_wrapper_returns_None_in_silent_mode(self):
     mocked_driver = mock.Mock(WebDriver)
     mocked_driver.find_element_by_id.side_effect = TimeoutException
     driver = SeleniumWrapper(mocked_driver)
     self.assertRaises(NoSuchElementException, driver.by_id, 'hoge')
     driver.silent = True
     self.assertIsNone(driver.by_id('hoge'))
 def test_silent_property_raise_AttributeError_if_none_bool_given(self):
     wrapper = SeleniumWrapper(self.mock)
     try:
         wrapper.silent = 1
     except AttributeError:
         pass
 def test_silent_property_raise_AttributeError_if_none_bool_given(self):
     wrapper = SeleniumWrapper(self.mock)
     try:
         wrapper.silent = 1
     except AttributeError:
         pass