import functools import ui_navigate as nav import cfme.fixtures.pytest_selenium as sel import cfme.web_ui as web_ui import cfme.web_ui.toolbar as tb from cfme.cloud import provisioning as prov from collections import OrderedDict from cfme.web_ui import accordion, tabstrip, Form, Table, Select, fill, flash, form_buttons from utils.update import Updateable from utils import version tb_select = functools.partial(tb.select, "Configuration") catalog_item_tree = web_ui.Tree( version.pick({ 'default': '//div[@id="sandt_tree_box"]//table', '9.9.9.9': '//div[@id="sandt_treebox"]//ul' })) template_select_form = Form( fields=[('template_table', Table('//div[@id="prov_vm_div"]//table[@class="style3"]') ), ('add_button', form_buttons.add), ('cancel_button', form_buttons.cancel)]) # Forms basic_info_form = Form(fields=[( 'name_text', "//input[@id='name']"), ( 'description_text', "//input[@id='description']" ), ('display_checkbox', "//input[@id='display']"
sel.wait_for_ajax() sel.sleep(1) provisioning_form = tabstrip.TabStripForm( fields=[('submit_button', '//*[@id="form_buttons"]/li[1]/img'), ('cancel_button', '//*[@id="form_buttons"]/li[2]/img')], tab_fields=OrderedDict([ ('Request', [('email', '//input[@name="requester__owner_email"]'), ('first_name', '//input[@id="requester__owner_first_name"]'), ('last_name', '//input[@id="requester__owner_last_name"]'), ('notes', '//textarea[@id="requester__request_notes"]'), ('manager_name', '//input[@id="requester__owner_manager"]')]), ('Purpose', [('apply_tags', ui.Tree('//div[@id="all_tags_treebox"]//table'))]), ('Catalog', [ ('num_instances', ui.Select('//select[@id="service__number_of_vms"]')), ('instance_name', '//input[@name="service__vm_name"]'), ('instance_description', '//textarea[@id="service__vm_description"]'), ('catalog_name', ui.Table('//div[@id="prov_vm_div"]/table')), ]), ('Environment', [ ('automatic_placement', '//input[@id="environment__placement_auto"]'), ('availability_zone', ui.Select( '//select[@id="environment__placement_availability_zone"]')), ('security_groups', select_security_group),
""" import functools import ui_navigate as nav import cfme.fixtures.pytest_selenium as sel import cfme.web_ui as web_ui import cfme.web_ui.toolbar as tb from cfme.provisioning import provisioning_form as request_form from cfme.web_ui import accordion, tabstrip, Form, Table, Select, fill,\ flash, form_buttons, Input, Tree from utils.update import Updateable from utils import version from utils.pretty import Pretty tb_select = functools.partial(tb.select, "Configuration") catalog_item_tree = web_ui.Tree('//div[@id="sandt_treebox"]//ul') dynamic_tree = Tree( "//div[@id='basic_info_div']//ul[@class='dynatree-container']") template_select_form = Form( fields=[('template_table', Table('//div[@id="prov_vm_div"]/table') ), ('add_button', form_buttons.add), ('cancel_button', form_buttons.cancel)]) # Forms basic_info_form = Form( fields=[('name_text', Input("name")), ( 'description_text', Input("description")), ('display_checkbox', Input("display")), ('select_catalog', Select("//select[@id='catalog_id']")
import functools import ui_navigate as nav import cfme.fixtures.pytest_selenium as sel import cfme.web_ui as web_ui import cfme.web_ui.toolbar as tb from cfme.provisioning import provisioning_form as request_form from cfme.web_ui import accordion, tabstrip, Form, Table, Select, fill,\ flash, form_buttons, Input, Tree from utils.update import Updateable from utils import version from utils.pretty import Pretty tb_select = functools.partial(tb.select, "Configuration") catalog_item_tree = web_ui.Tree({ version.LOWEST: '//div[@id="sandt_tree_box"]//table', '5.3': '//div[@id="sandt_treebox"]//ul' }) dynamic_tree = Tree( "//div[@id='basic_info_div']//ul[@class='dynatree-container']") template_select_form = Form( fields=[('template_table', Table('//div[@id="prov_vm_div"]/table') ), ('add_button', form_buttons.add), ('cancel_button', form_buttons.cancel)]) # Forms basic_info_form = Form( fields=[('name_text', Input("name")), ( 'description_text', Input("description")), ('display_checkbox', Input("display")),
from cfme.exceptions import TemplateNotFound from cfme.fixtures import pytest_selenium as sel from cfme.services import requests from cfme.web_ui import fill, flash, form_buttons, tabstrip, toolbar from cfme.web_ui.menu import nav from utils import version from utils.log import logger from utils.version import current_version from utils.wait import wait_for # nav imports import cfme.infrastructure.virtual_machines # NOQA import cfme.cloud.instance # NOQA instances_by_provider_tree = ui.Tree("ul.dynatree-container") submit_button = form_buttons.FormButton("Submit") template_select_form = ui.Form( fields=[ ('template_table', ui.Table('//div[@id="pre_prov_div"]//table')), ('cancel_button', form_buttons.cancel) ] ) def select_security_group(sg): """Workaround for select box that is immediately replaced by the same select box no matter what selenium clicks on (but works fine manually). For now only selects one item even though it's a multiselect.