def step_impl(context, link_text): page = HomePage(context.driver) services = page.services_list for s in services: if link_text in s.text: matching = s if matching != 0: matching.click() else: raise RuntimeError()
def step_impl(context, link_text): page = HomePage(context.driver) page.services_button.click() services = page.services_list matching = [] for s in services: print(s.text) if link_text in s.text: matching.append(s) if len(matching) > 0: assert matching[0].is_enabled() else: raise RuntimeError()
def step_impl(context): page = HomePage(context.driver) page.search_field.send_keys('"Apple iPhone" grün' + Keys.ENTER)
def step_impl(context): page = HomePage(context.driver) page.extension_link.click()
def step_impl(context): page = HomePage(context.driver) page.services_button.click()
def step_impl(context): page = HomePage(context.driver) page.region_with_news.click()
def step_impl(context): page = HomePage(context.driver) page.region_list.click()
def step_impl(context): page = HomePage(context.driver) page.region_selection.click() context.driver.implicitly_wait(10)
def step_impl(context, text): page = HomePage(context.driver) page.search_field.send_keys(text) context.driver.implicitly_wait(10)
def step_impl(context): page = HomePage(context.driver) assert page.news_widget.is_enabled()
def step_impl(context): page = HomePage(context.driver) assert page.region_selection.text == "Argentina"
def step_impl(context): page = HomePage(context.driver) assert page.suggest_second_item.is_enabled()
def step_impl(context): page = HomePage(context.driver) active_element = context.driver.switch_to.active_element #print(active_element.get_attribute("class")) assert page.search_field == active_element