def test_component_can_be_clicked(self): self.driver.set_dom_element([By.ID, 'an_id']) self.driver.set_expected_command(Command.CLICK_ELEMENT, {'sessionId': self.driver.session_id, 'id': self.driver.get_id_for_stored_element([By.ID, 'an_id'])}) component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id']) ## component.click() ## assert_that(self.driver.has_fulfilled_expectations(), equal_to(True), "clicking on component should result in click command")
def test_component_can_be_clicked(self): self.driver.set_dom_element([By.ID, 'an_id']) self.driver.set_expected_command( Command.CLICK_ELEMENT, { 'sessionId': self.driver.session_id, 'id': self.driver.get_id_for_stored_element([By.ID, 'an_id']) }) component = UIComponent(self.driver, 'a_component', [By.ID, 'an_id']) ## component.click() ## assert_that(self.driver.has_fulfilled_expectations(), equal_to(True), "clicking on component should result in click command")