def create(self): sel.force_navigate('cfg_accesscontrol_group_add') fill(self.group_form, {'description_txt': self.description, 'role_select': self.role, 'group_tenant': self.tenant}, action=form_buttons.add) flash.assert_success_message('Group "%s" was saved' % self.description)
def update(self, updates): navigate_to(self, 'Edit') change_stored_password() new_updates = {} if 'credential' in updates: new_updates.update({ 'userid_txt': updates.get('credential').principal, 'password_txt': updates.get('credential').secret, 'password_verify_txt': updates.get('credential').verify_secret }) if self.appliance.version >= '5.7': self.name = updates.get('credential').principal new_updates.update({ 'name_txt': updates.get('name'), 'email_txt': updates.get('email'), 'user_group_select': getattr(updates.get('group'), 'description', None) }) fill(self.user_form, new_updates, action=form_buttons.save) flash.assert_success_message('User "{}" was saved'.format( updates.get('name', self.name)))
def create(self): sel.force_navigate('cfg_accesscontrol_role_add') fill(self.form, {'name_txt': self.name, 'vm_restriction_select': self.vm_restriction, 'product_features_tree': self.product_features}, action=form_buttons.add) flash.assert_success_message('Role "{}" was saved'.format(self.name))
def update(self, updates): sel.force_navigate('catalog_edit', context={'catalog': self}) web_ui.fill(form, {'name_text': updates.get('name', None), 'description_text': updates.get('description', None), 'button_multiselect': updates.get('items', None)}, action=form.save_button) flash.assert_success_message('Catalog "{}" was saved'.format(self.name))
def order(self): navigate_to(self, 'Order') if self.stack_data: stack_form.fill(self.stack_data) sel.click(form_buttons.submit) wait_for(flash.get_messages, num_sec=10, delay=2, fail_condition=[], fail_func=tb.refresh()) flash.assert_success_message("Order Request was Submitted")
def create(self): sel.force_navigate('cfg_accesscontrol_group_add') fill(self.group_form, {'description_txt': self.description, 'role_select': self.role, 'group_tenant': self.tenant}, action=form_buttons.add) flash.assert_success_message('Group "{}" was saved'.format(self.description))
def update(self, updates): sel.force_navigate("cfg_accesscontrol_group_edit", context={"group": self}) fill(self.group_form, {'description_txt': updates.get('description'), 'role_select': updates.get('role')}, action=form_buttons.save) flash.assert_success_message( 'Group "%s" was saved' % updates.get('description', self.description))
def create(self): navigate_to(self, 'Add') fill(self.group_form, {'description_txt': self.description, 'role_select': self.role, 'group_tenant': self.tenant}, action=form_buttons.add) flash.assert_success_message('Group "{}" was saved'.format(self.description))
def update(self, updates): sel.force_navigate('group_button_edit', context={"buttongroup": self}) edited_hvr_text = updates.get('hover', None) fill(button_group_form, {'btn_group_hvr_text': edited_hvr_text}) sel.click(button_group_form.save_button) flash.assert_success_message( 'Buttons Group "{}" was saved'.format(edited_hvr_text))
def update(self, updates): sel.force_navigate('button_edit', context={'button': self}) edited_hover = updates.get('hover', None) fill(button_form, {'btn_hvr_text': edited_hover}) sel.click(button_form.save_button) flash.assert_success_message( 'Button "{}" was saved'.format(edited_hover))
def create(self): sel.force_navigate('catalog_new') web_ui.fill(form, {'name_text': self.name, 'description_text': self.description, 'button_multiselect': self.items}, action=form.add_button) flash.assert_success_message('ServiceTemplateCatalog "{}" was saved'.format(self.name))
def create(self): navigate_to(self, 'Add') fill( label_form, { 'label': self.label, 'description_text': self.description, 'submit_button': self.submit, 'cancel_button': self.cancel }) plus_btn("Add a new Tab to this Dialog") sel.wait_for_element(tab_form.tab_label) fill(tab_form, { 'tab_label': self.tab_label, 'tab_desc': self.tab_desc }) plus_btn("Add a new Box to this Tab") sel.wait_for_element(box_form.box_label) fill(box_form, { 'box_label': self.box_label, 'box_desc': self.box_desc }) if isinstance(self.element_data, (list, tuple)): self.add_element(*self.element_data) else: self.add_element(self.element_data) sel.click(form_buttons.add) flash.assert_success_message('Dialog "{}" was added'.format( self.label))
def delete(self): sel.force_navigate("my_settings_time_profiles") row = timeprofile_table.find_row_by_cells({"description": self.description}) sel.check(sel.element(".//input[@type='checkbox']", root=row[0])) cfg_btn("Delete selected Time Profiles", invokes_alert=True) sel.handle_alert() flash.assert_success_message('Time Profile "{}": Delete successful'.format(self.description))
def add_jdbc_driver(self, filename, driver_name, module_name, driver_class, xa_class=None, major_version=None, minor_version=None, cancel=False): """Clicks to "Add JDBC Driver" button, in opened window fills fields by provided parameters, and deploys. Args: filename: Full path to JDBC Driver to import. driver_name: Name of newly created JDBC Driver. module_name: Name on Module to register on server side. driver_class: JDBC Driver Class. major_version: Major version of JDBC driver, optional. minor_version: Minor version of JDBC driver, optional. cancel: Whether to click Cancel instead of commit. """ self.load_details(refresh=True) jdbc_btn("Add JDBC Driver") fill(jdbc_driver_form, { "file_select": filename, "jdbc_driver_name": driver_name, "jdbc_module_name": module_name, "jdbc_driver_class": driver_class, "driver_xa_datasource_class": xa_class, "major_version": major_version, "minor_version": minor_version }) sel.click(jdbc_driver_form.cancel_button if cancel else jdbc_driver_form.deploy_button) flash.assert_success_message('JDBC Driver "{}" has been installed on this server.' .format(driver_name))
def delete(self): sel.force_navigate('button', context={'buttongroup': self.btngrp, 'button': self.btn_text}) cfg_btn("Remove this Button", invokes_alert=True) sel.handle_alert() flash.assert_success_message('Button "%s": Delete successful' % self.btn_hvr_text)
def test_server_suspend_resume(provider): """Tests server suspend/resume operation on UI Steps: * Get servers list from UI * Chooses Wildfly server from list * Invokes Suspend Server' toolbar operation * Checks that server status is not running in UI, in DB and in MGMT. * Invokes 'Resume Server' toolbar operation * Waits for some time * Checks that server status is running in UI, in DB and in MGMT. """ server_list = MiddlewareServer.servers(provider=provider) for _server in server_list: if _server.product != 'Hawkular': server = _server break assert server, 'Wildfly server was not found in servers list' _check_server_running(server) server.suspend_server() flash.assert_success_message('Suspend initiated for selected server(s)') # enable when HWKINVENT-185 is fixed # _check_server_stopped(server) server.resume_server() flash.assert_success_message('Resume initiated for selected server(s)') _check_server_running(server)
def update(self, updates): navigate_to(self, 'Edit') fill(self.form, {'name_txt': updates.get('name'), 'vm_restriction_select': updates.get('vm_restriction'), 'product_features_tree': updates.get('product_features')}, action=form_buttons.save) flash.assert_success_message('Role "{}" was saved'.format(updates.get('name', self.name)))
def edit_tags(self, tag, value): navigate_to(self, 'Details') pol_btn("Edit 'My Company' Tags for this Group", invokes_alert=True) fill(edit_tags_form, {'select_tag': tag, 'select_value': value}, action=form_buttons.save) flash.assert_success_message('Tag edits were successfully saved')
def edit_tags(self, tag, value): sel.force_navigate("cfg_accesscontrol_group_ed", context={"group": self}) pol_btn("Edit 'My Company' Tags for this Group", invokes_alert=True) fill(edit_tags_form, {'select_tag': tag, 'select_value': value}, action=form_buttons.save) flash.assert_success_message('Tag edits were successfully saved')
def update(self, updates): navigate_to(self, 'Edit') # Workaround - form is appearing after short delay sel.wait_for_element(self.tenant_form.description) fill(self.tenant_form, updates, action=self.save_changes) flash.assert_success_message( 'Project "{}" was saved'.format(updates.get('name', self.name)))
def update(self, updates): sel.force_navigate("cfg_accesscontrol_role_edit", context={"role": self}) fill(self.form, {'name_txt': updates.get('name'), 'vm_restriction_select': updates.get('vm_restriction'), 'product_features_tree': updates.get('product_features')}, action=form_buttons.save) flash.assert_success_message('Role "{}" was saved'.format(updates.get('name', self.name)))
def set_ownership(self, owner, group): sel.force_navigate('service_set_ownership', context={'service_name': self.service_name}) fill(set_ownership_form, {'select_owner': owner, 'select_group': group}, action=form_buttons.save) flash.assert_success_message('Ownership saved for selected Service')
def dialog(): dialog_name = "dialog_" + fauxfactory.gen_alphanumeric() element_data = dict(ele_label="ele_" + fauxfactory.gen_alphanumeric(), ele_name=fauxfactory.gen_alphanumeric(), ele_desc="my ele desc", choose_type="Text Box", default_text_box="default value") service_dialog = ServiceDialog( label=dialog_name, description="my dialog", submit=True, cancel=True, tab_label="tab_" + fauxfactory.gen_alphanumeric(), tab_desc="my tab desc", box_label="box_" + fauxfactory.gen_alphanumeric(), box_desc="my box desc", element_data=element_data) service_dialog.create() flash.assert_success_message('Dialog "{}" was added'.format(dialog_name)) yield service_dialog # fixture cleanup try: service_dialog.delete() except NoSuchElementException or TimeoutException: logger.warning( 'test_catalog_item: dialog yield fixture cleanup, dialog "{}" not ' 'found'.format(dialog_name))
def edit_tags(self, tag, value): sel.force_navigate('service_edit_tags', context={'service_name': self.service_name}) fill(edit_tags_form, {'select_tag': tag, 'select_value': value}, action=form_buttons.save) flash.assert_success_message('Tag edits were successfully saved')
def set_ownership(self, user=None, group=None, click_cancel=False, click_reset=False): """Set ownership of the VM/Instance or Template/Image""" sel.click(self.find_quadicon(False, False, False)) cfg_btn('Set Ownership') if click_reset: action = form_buttons.reset msg_assert = lambda: flash.assert_message_match( 'All changes have been reset') elif click_cancel: action = form_buttons.cancel msg_assert = lambda: flash.assert_success_message( 'Set Ownership was cancelled by the user') else: action = form_buttons.save msg_assert = lambda: flash.assert_success_message( 'Ownership saved for selected Virtual Machine') fill(set_ownership_form, { 'user_name': user, 'group_name': group }, action=action) msg_assert()
def update(self, updates): sel.force_navigate("cfg_accesscontrol_role_edit", context={"role": self}) fill(self.form, {'name_txt': updates.get('name'), 'vm_restriction_select': updates.get('vm_restriction'), 'product_features_tree': updates.get('product_features')}, action=form_buttons.save) flash.assert_success_message('Role "%s" was saved' % updates.get('name', self.name))
def edit_schema(self, add_fields=None, remove_fields=None): navigate_to(self, "SchemaEdit") for remove_field in remove_fields or []: f = remove_field.get_form() fill(f, {}, action=f.remove_entry_button, action_always=True) for add_field in add_fields or []: sel.click(self.schema_edit_page.add_field_btn) f = add_field.get_form(blank=True) fill( f, { "name_text": add_field.name, "type_select": add_field.type_, "data_type_select": add_field.data_type, "default_value_text": add_field.default_value, "description_text": add_field.description, "sub_cb": add_field.sub, "collect_text": add_field.collect, "message_text": add_field.message, "on_entry_text": add_field.on_entry, "on_exit_text": add_field.on_exit, "max_retries_text": add_field.max_retries, "max_time_text": add_field.max_time, }, action=f.add_entry_button, ) sel.click(form_buttons.save) flash.assert_success_message('Schema for Automate Class "{}" was saved'.format(self.name))
def delete(self): sel.force_navigate('button_group', context={'buttongroup': self.group_text}) cfg_btn("Remove this Button Group", invokes_alert=True) sel.handle_alert() flash.assert_success_message('Buttons Group "%s": Delete successful' % self.group_hover_text)
def test_hawkular_reload(provider): """Tests Hawkular server itself reload operation message on UI Steps: * Get servers list from UI * Chooses Hawkular server from list * Invokes 'Reload Server' toolbar operation * Checks that notification message is shown * Checks that server status is running in UI, in DB and in MGMT. * Invokes 'Stop Server' toolbar operation * Checks that notification message is shown * Checks that server status is running in UI, in DB and in MGMT. """ server_list = MiddlewareServer.servers(provider=provider) for _server in server_list: if _server.product == 'Hawkular': server = _server break assert server, 'Hawkular server was not found in servers list' server.reload_server() flash.assert_success_message('Not reloading Hawkular server') _check_server_running(server) server.stop_server() flash.assert_success_message('Not stopping Hawkular server') _check_server_running(server)
def create(self, *element_data): sel.force_navigate('service_dialog_new') fill( label_form, { 'label': self.label, 'description_text': self.description, 'submit_button': self.submit, 'cancel_button': self.cancel, 'label': self.label }) plus_btn("Add a new Tab to this Dialog") sel.wait_for_element(tab_form.tab_label) fill(tab_form, { 'tab_label': self.tab_label, 'tab_desc': self.tab_desc }) plus_btn("Add a new Box to this Tab") sel.wait_for_element(box_form.box_label) fill(box_form, { 'box_label': self.box_label, 'box_desc': self.box_desc }) self.add_element(*element_data) sel.click(form_buttons.add) flash.assert_success_message('Dialog "{}" was added'.format( self.label))
def update(self, updates): sel.force_navigate("cfg_accesscontrol_group_edit", context=self) fill(self.group_form, {'description_txt': updates.get('description'), 'role_select': updates.get('role')}, action=form_buttons.save) flash.assert_success_message( 'Group "%s" was saved' % updates.get('description', self.description))
def create(self): navigate_to(self, 'Add') fill(self.form, {'name_txt': self.name, 'vm_restriction_select': self.vm_restriction, 'product_features_tree': self.product_features}, action=form_buttons.add) flash.assert_success_message('Role "{}" was saved'.format(self.name))
def dialog(): dialog = "dialog_" + generate_random_string() service_dialog = ServiceDialog(label=dialog, description="my dialog", submit=True, cancel=True) service_dialog.create() flash.assert_success_message('Dialog "%s" was added' % dialog) yield dialog
def create(self): sel.force_navigate('cfg_accesscontrol_role_add') fill(self.form, {'name_txt': self.name, 'vm_restriction_select': self.vm_restriction, 'product_features_tree': self.product_features}, action=form_buttons.add) flash.assert_success_message('Role "%s" was saved' % self.name)
def create(self): sel.force_navigate('catalog_item_new', context={'provider_type': self.item_type}) fill( basic_info_form, { 'name_text': self.name, 'description_text': self.description, 'display_checkbox': self.display_in, 'select_catalog': self.catalog, 'select_dialog': self.dialog }) tabstrip.select_tab("Request Info") template = template_select_form.template_table.find_row_by_cells({ 'Name': self.catalog_name, 'Provider': self.provider }) sel.click(template) web_ui.fill( request_form, { 'instance_name': self.vm_name, 'instance_type': self.instance_type, 'guest_keypair': self.guest_keypair, 'availability_zone': self.availability_zone, 'security_groups': self.security_groups[0], # not supporting multiselect now, # just take first value }) sel.click(template_select_form.add_button) flash.assert_success_message('Service Catalog Item "%s" was added' % self.name)
def update(self, updates): sel.force_navigate('catalog_item_edit', context={'catalog': self.catalog, 'catalog_item': self}) fill(basic_info_form, {'name_text': updates.get('name', None), 'description_text': updates.get('description', None)}, action=basic_info_form.edit_button) flash.assert_success_message('Service Catalog Item "%s" was saved' % self.name)
def add_deployment(self, filename, runtime_name=None, enable_deploy=True, overwrite=False, cancel=False): """Clicks to "Add Deployment" button, in opened window fills fields by provided parameters, and deploys. Args: filename: Full path to file to import. runtime_name: Runtime name of deployment archive. enable_deploy: Whether to enable deployment archive or keep disabled. cancel: Whether to click Cancel instead of commit. """ self.load_details() deploy_btn("Add Deployment") fill( import_form, { "file_select": filename, "runtime_name": runtime_name, "enable_deployment": enable_deploy, "force_deployment": overwrite }) sel.click( import_form.cancel_button if cancel else import_form.deploy_button) flash.assert_success_message( 'Deployment "{}" has been initiated on this server.'.format( runtime_name if runtime_name else os.path.basename(filename)))
def create(self): domain = "ManageIQ (Locked)" sel.force_navigate('catalog_item_new', context={'provider_type': self.item_type}) sel.wait_for_element(basic_info_form.name_text) fill(basic_info_form, {'name_text': self.name, 'description_text': self.description, 'display_checkbox': self.display_in, 'select_catalog': self.catalog, 'select_dialog': self.dialog}) if self.item_type != "Orchestration": sel.click(basic_info_form.field_entry_point) dynamic_tree.click_path("Datastore", domain, "Service", "Provisioning", "StateMachines", "ServiceProvision_Template", "default") sel.click(basic_info_form.apply_btn) tabstrip.select_tab("Request Info") # Address BZ1321631 tabstrip.select_tab("Environment") tabstrip.select_tab("Catalog") template = template_select_form.template_table.find_row_by_cells({ 'Name': self.catalog_name, 'Provider': self.provider }) sel.click(template) web_ui.fill(request_form, { 'instance_name': self.vm_name, 'instance_type': self.instance_type, 'guest_keypair': self.guest_keypair, 'availability_zone': self.availability_zone, 'cloud_tenant': self.cloud_tenant, 'cloud_network': self.cloud_network, 'security_groups': self.security_groups[0], # not supporting multiselect now, # just take first value }) sel.click(template_select_form.add_button) flash.assert_success_message('Service Catalog Item "{}" was added'.format(self.name))
def edit_tags(self, tag, value): navigate_to(self, 'Details') policy_btn('Edit Tags', invokes_alert=True) fill(edit_tags_form, {'select_tag': tag, 'select_value': value}, action=form_buttons.save) flash.assert_success_message('Tag edits were successfully saved')
def delete(self): sel.force_navigate("cfg_accesscontrol_group_ed", context={"group": self}) tb_select('Delete this Group', invokes_alert=True) sel.handle_alert() flash.assert_success_message( 'EVM Group "{}": Delete successful'.format(self.description))
def add_jdbc_driver(self, filename, driver_name, module_name, driver_class, major_version=None, minor_version=None, cancel=False): """Clicks to "Add JDBC Driver" button, in opened window fills fields by provided parameters, and deploys. Args: filename: Full path to JDBC Driver to import. driver_name: Name of newly created JDBC Driver. module_name: Name on Module to register on server side. driver_class: JDBC Driver Class. major_version: Major version of JDBC driver, optional. minor_version: Minor version of JDBC driver, optional. cancel: Whether to click Cancel instead of commit. """ self.load_details(refresh=True) jdbc_btn("Add JDBC Driver") fill(jdbc_driver_form, { "file_select": filename, "jdbc_driver_name": driver_name, "jdbc_module_name": module_name, "jdbc_driver_class": driver_class, "major_version": major_version, "minor_version": minor_version }) sel.click(jdbc_driver_form.cancel_button if cancel else jdbc_driver_form.deploy_button) flash.assert_success_message('JDBC Driver "{}" has been installed on this server.' .format(driver_name))
def update(self, updates): navigate_to(self, 'Edit') fill(basic_info_form, {'name_text': updates.get('name', None), 'description_text': updates.get('description', None)}, action=basic_info_form.edit_button) flash.assert_success_message('Service Catalog Item "{}" was saved'.format(self.name))
def add_button(self): sel.force_navigate('catalog_item', context={ 'catalog': self.catalog, 'catalog_item': self }) cfg_btn('Add a new Button', invokes_alert=True) sel.wait_for_element(button_form.btn_text) fill(button_form, { 'btn_text': "btn_text", 'btn_hvr_text': "btn_descr" }) if current_version() > "5.5": select = AngularSelect("button_image") select.select_by_visible_text("Button Image 1") else: select = DHTMLSelect("div#button_div") select.select_by_value(2) fill( button_form, { 'select_dialog': self.dialog, 'system_process': "Request", 'request': "InspectMe" }) sel.click(button_form.add_button) flash.assert_success_message('Button "btn_descr" was added')
def create(self): sel.force_navigate('catalog_item_new', context={'provider_type': self.item_type}) sel.wait_for_element(basic_info_form.name_text) fill(basic_info_form, {'name_text': self.name, 'description_text': self.description, 'display_checkbox': self.display_in, 'select_catalog': self.catalog, 'select_dialog': self.dialog}) tabstrip.select_tab("Request Info") template = template_select_form.template_table.find_row_by_cells({ 'Name': self.catalog_name, 'Provider': self.provider }) sel.click(template) web_ui.fill(request_form, { 'instance_name': self.vm_name, 'instance_type': self.instance_type, 'guest_keypair': self.guest_keypair, 'availability_zone': self.availability_zone, 'cloud_tenant': self.cloud_tenant, 'cloud_network': self.cloud_network, 'security_groups': self.security_groups[0], # not supporting multiselect now, # just take first value }) sel.click(template_select_form.add_button) flash.assert_success_message('Service Catalog Item "%s" was added' % self.name)
def test_authentication(provider): """Tests executing "Re-check Authentication Status" menu item. Verifies that success message is shown. """ provider.recheck_auth_status() flash.assert_success_message('Authentication status will be saved' ' and workers will be restarted for the selected Middleware Provider')
def edit_schema(self, add_fields=None, remove_fields=None): sel.force_navigate("automate_explorer_schema_edit", context={'tree_item': self}) for remove_field in remove_fields or []: f = remove_field.get_form() fill(f, {}, action=f.remove_entry_button, action_always=True) for add_field in add_fields or []: sel.click(self.schema_edit_page.add_field_btn) f = add_field.get_form(blank=True) fill(f, {'name_text': add_field.name, 'type_select': add_field.type_, 'data_type_select': add_field.data_type, 'default_value_text': add_field.default_value, 'description_text': add_field.description, 'sub_cb': add_field.sub, 'collect_text': add_field.collect, 'message_text': add_field.message, 'on_entry_text': add_field.on_entry, 'on_exit_text': add_field.on_exit, 'max_retries_text': add_field.max_retries, 'max_time_text': add_field.max_time}, action=f.add_entry_button) sel.click(form_buttons.save) flash.assert_success_message('Schema for Automate Class "{}" was saved'.format(self.name))
def add_deployment(self, filename, runtime_name=None, enable_deploy=True, cancel=False): """Clicks to "Add Deployment" button, in opened window fills fields by provided parameters, and deploys. Args: filename: Full path to file to import. runtime_name: Runtime name of deployment archive. enable_deploy: Whether to enable deployment archive or keep disabled. cancel: Whether to click Cancel instead of commit. """ self.load_details() deploy_btn("Add Deployment") fill( import_form, {"file_select": filename}, ) if runtime_name: fill( import_form, {"runtime_name": runtime_name}, ) if not enable_deploy: fill( import_form, {"enable_deployment": enable_deploy} ) sel.click(import_form.cancel_button if cancel else import_form.deploy_button) flash.assert_success_message('Deployment "{}" has been initiated on this server.' .format(runtime_name if runtime_name else os.path.basename(filename)))
def edit_schema(self, add_fields=None, remove_fields=None): sel.force_navigate("automate_explorer_schema_edit", context={'tree_item': self}) for remove_field in remove_fields or []: f = remove_field.get_form() fill(f, {}, action=f.remove_entry_button) sel.handle_alert() for add_field in add_fields or []: sel.click(self.schema_edit_page.add_field_btn) f = add_field.get_form(blank=True) fill(f, { 'name_text': add_field.name, 'type_select': add_field.type_, 'data_type_select': add_field.data_type, 'default_value_text': add_field.default_value, 'description_text': add_field.description, 'sub_cb': add_field.sub, 'collect_text': add_field.collect, 'message_text': add_field.message, 'on_entry_text': add_field.on_entry, 'on_exit_text': add_field.on_exit, 'max_retries_text': add_field.max_retries, 'max_time_text': add_field.max_time }, action=f.add_entry_button) sel.click(self.schema_edit_page.save_btn) flash.assert_success_message( 'Schema for Automate Class "%s" was saved' % self.name)
def create(self, cancel=False): sel.force_navigate("automate_explorer_class_new", context={"tree_item": self.namespace}) fill( self.form, { 'name_text': self.name, 'description_text': self.description, # 'display_name_text': self.display_name, 'inherits_from_select': self.inherits_from and self.inherits_from.path_str() }, action={ True: self.form.cancel_btn, False: self.form.add_btn }[cancel]) try: flash.assert_success_message('Automate Class "%s" was added' % self.path_str()) except Exception as e: if error.match("Name has already been taken", e): sel.click(self.form.cancel_btn) raise
def retire(self): self.load_details(refresh=True) lcl_btn(self.TO_RETIRE, invokes_alert=True) sel.handle_alert() flash.assert_success_message({ version.LOWEST: "Retire initiated for 1 VM and Instance from the CFME Database", "5.5": "Retirement initiated for 1 VM and Instance from the CFME Database"})
def create(self): sel.force_navigate('new_button_group', context={"buttongroup": self}) fill(button_group_form, {'btn_group_text': self.text, 'btn_group_hvr_text': self.hover}) select = DHTMLSelect("div#button_div") select.select_by_value(1) sel.click(button_group_form.add_button) flash.assert_success_message('Buttons Group "{}" was added'.format(self.hover))
def remove(self): """ Clicks on "Remove" button of "Operations" menu item and verifies message shown """ self.load_details() operations_btn("Remove", invokes_alert=True) sel.handle_alert() flash.assert_success_message('The selected datasources were removed')