當前位置: 首頁>>代碼示例>>Python>>正文


Python ButtonGroup.type方法代碼示例

本文整理匯總了Python中cfme.automate.buttons.ButtonGroup.type方法的典型用法代碼示例。如果您正苦於以下問題:Python ButtonGroup.type方法的具體用法?Python ButtonGroup.type怎麽用?Python ButtonGroup.type使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cfme.automate.buttons.ButtonGroup的用法示例。


在下文中一共展示了ButtonGroup.type方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_button_on_host

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 別名]
def test_button_on_host(appliance, request, provider, setup_provider):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.HOST
    request.addfinalizer(buttongroup.delete_if_exists)
    buttongroup.create()
    button = Button(group=buttongroup,
                    text=fauxfactory.gen_alphanumeric(),
                    hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
                    system="Request", request="InspectMe")
    request.addfinalizer(button.delete_if_exists)
    button.create()
    host = appliance.collections.hosts.all(provider)[0]
    host.execute_button(buttongroup.hover, button.text, handle_alert=None)
開發者ID:hhovsepy,項目名稱:cfme_tests,代碼行數:17,代碼來源:test_buttons.py

示例2: test_button_on_host

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 別名]
def test_button_on_host(dialog, request):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.HOST
    request.addfinalizer(buttongroup.delete_if_exists)
    buttongroup.create()
    button = Button(group=buttongroup,
                    text=fauxfactory.gen_alphanumeric(),
                    hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
                    dialog=dialog, system="Request", request="InspectMe")
    request.addfinalizer(button.delete_if_exists)
    button.create()
    myhost = host.get_from_config('esx')
    if not myhost.exists:
        myhost.create()
    myhost.execute_button(buttongroup.hover, button.text)
開發者ID:dajohnso,項目名稱:cfme_tests,代碼行數:19,代碼來源:test_buttons.py

示例3: custom_service_button

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 別名]
def custom_service_button(ansible_catalog_item):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.SERVICE
    buttongroup.create()
    button = Button(
        group=buttongroup,
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
        dialog=ansible_catalog_item.provisioning["provisioning_dialog_name"],
        system="Request",
        request="Order_Ansible_Playbook"
    )
    button.create()
    yield button
    button.delete_if_exists()
    buttongroup.delete_if_exists()
開發者ID:jkandasa,項目名稱:integration_tests,代碼行數:20,代碼來源:test_embedded_ansible_services.py

示例4: custom_vm_button

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 別名]
def custom_vm_button(ansible_catalog_item):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.VM_INSTANCE
    buttongroup.create()
    button = Button(
        group=buttongroup,
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
        dialog=ansible_catalog_item.provisioning["provisioning_dialog_name"],
        system="Request",
        request="Order_Ansible_Playbook",
        attributes=[
            {"key": "hosts", "value": "localhost"},
            {"key": "service_template_name", "value": ansible_catalog_item.name}
        ]
    )
    button.create()
    yield button
    button.delete_if_exists()
    buttongroup.delete_if_exists()
開發者ID:hhovsepy,項目名稱:cfme_tests,代碼行數:24,代碼來源:test_embedded_ansible_automate.py


注:本文中的cfme.automate.buttons.ButtonGroup.type方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。