Exemple #1
0
 def test_can_cache_element(self):
     component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id'])
     component.cache()
     cached_element = MockedWebElement(self.driver, 'another_id')
     ##
     component._cache_web_element(cached_element)
     ##
     assert_that(component.locate(), equal_to(cached_element))
Exemple #2
0
 def test_can_cache_element(self):
     component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id'])
     component.cache()
     cached_element = MockedWebElement(self.driver, 'another_id')
     ##
     component._cache_web_element(cached_element)
     ##
     assert_that(component.locate(), equal_to(cached_element))