def select_product_and_version_filter(self):
     utilities.click_element(self.driver, By.LINK_TEXT, "Search")
     utilities.wait(2)
     utilities.select_value_from_dropdown(self.driver, By.CSS_SELECTOR,
                                          locators.SELECT_PRODUCT_NAME_CSS,
                                          constants.product_name)
     utilities.select_value_from_dropdown(
         self.driver, By.CSS_SELECTOR, locators.SELECT_PRODUCT_VERSION_CSS,
         constants.product_version)
     lcc.log_info(
         "product and version selected and displayed on search page")
     utilities.find_element(
         self.driver, By.XPATH,
         locators.PRODUCT_FILTER_DISPLAY_XPATH).is_displayed()
     utilities.click_element(self.driver, By.CSS_SELECTOR,
                             locators.SEARCH_BUTTON_CSS)
     utilities.wait(2)
     utilities.click_element(self.driver, By.XPATH,
                             locators.SEARCH_MODULE_XPATH)
     utilities.wait(2)
     check_that(
         "verify that 'filter by product and version' functionality filters results correctly",
         utilities.get_text(self.driver, By.XPATH,
                            locators.PRODUCT_VERSION_DISPLAY_PAGE_XPATH),
         contains_string(constants.product_name + " " +
                         constants.product_version))
def add_bulk_metadata(driver):
    utilities.select_value_from_dropdown(driver, By.XPATH,
                                         locators.EDIT_METADATA_SELECT_PRODUCT,
                                         constants.product_name)
    utilities.select_value_from_dropdown(driver, By.XPATH,
                                         locators.EDIT_METADATA_SELECT_VERSION,
                                         constants.product_version)
    utilities.select_value_from_dropdown(driver, By.XPATH,
                                         locators.EDIT_METADATA_SELECT_USECASE,
                                         constants.use_case)
    utilities.click_element(driver, By.XPATH, locators.EDIT_METADATA_SAVE)
def reset_edit_metadata_from(driver):
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR,
                                         locators.PRODUCT_NAME_DROPDOWN_CSS,
                                         "Select a Product")
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR,
                                         locators.PRODUCT_VERSION_DROPDOWN_CSS,
                                         "Select a Version")
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR,
                                         locators.PRODUCT_USECASE_DROPDOWN_CSS,
                                         "Select Use Case")
    utilities.enter_text(driver, By.CSS_SELECTOR,
                         locators.PRODUCT_URLFRAGMENT_CSS, "")
def fill_edit_metadata_form(driver, product_name, product_version, usecase,
                            url_fragment):
    utilities.wait(2)
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR,
                                         locators.PRODUCT_NAME_DROPDOWN_CSS,
                                         product_name)
    utilities.wait(5)
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR,
                                         locators.PRODUCT_VERSION_DROPDOWN_CSS,
                                         product_version)
    utilities.wait(2)
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR,
                                         locators.PRODUCT_USECASE_DROPDOWN_CSS,
                                         usecase)
    utilities.wait(2)
    utilities.enter_text(driver, By.CSS_SELECTOR,
                         locators.PRODUCT_URLFRAGMENT_CSS, url_fragment)
    utilities.wait(5)
    utilities.click_element(driver, By.CSS_SELECTOR,
                            locators.EDIT_METADATA_SAVE_CSS)
    utilities.wait(2)
Пример #5
0
def filter_by_module_type(driver, module_type):
    utilities.wait(2)
    utilities.select_value_from_dropdown(driver, By.CSS_SELECTOR, locators.MODULE_TYPE_DROPDOWN_CSS, module_type)
    utilities.click_element(driver, By.CSS_SELECTOR, locators.SEARCH_BUTTON_CSS)
    utilities.wait(3)