def click_on_add_image_button(driver): """ Click on add new image button in new product menu :param driver: browser web driver """ BasePage.click_on_first_object_from_many(driver, locator=locators.add_image_locator, attribute="data-original-title", attribute_value="Add Image")
def click_choose_all_products_checkbox(driver): """ Iter all checkboxes and found checkbox for choose all products :param driver: browser web driver """ BasePage.click_on_first_object_from_many(driver, locator=locators.checkboxes_locator, attribute='type', attribute_value='checkbox')
def find_and_click_edit_button(driver): """ Find from buttons edit button and click it :param driver: browser web river """ BasePage.click_on_first_object_from_many(driver, locator=locators.edit_product_button_locator, attribute='data-original-title', attribute_value='Edit')
def select_downloaded_file(driver): """ Select first file checkbox :param driver: browser web driver """ BasePage.click_on_first_object_from_many( driver, locators.check_box_type_locator, attribute="name", attribute_value="selected[]")