def find_login_link(self, start_state): for element in start_state.elements: if element.type == ElementType.LOGIN: field = WebElement(self.driver, element.locators) if field.is_clickable(): return element return None
def find_submit(self, start_state, element_types): for element in start_state.elements: if element.type in element_types: field = WebElement(self.driver, element.locators) if field.is_clickable(): return element raise Exception("Could find %s field in state : %s" % (element_types, start_state.id))