当前位置: 首页>>代码示例>>Python>>正文


Python ui.navigate_to函数代码示例

本文整理汇总了Python中utils.appliance.endpoints.ui.navigate_to函数的典型用法代码示例。如果您正苦于以下问题:Python navigate_to函数的具体用法?Python navigate_to怎么用?Python navigate_to使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了navigate_to函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: exists

 def exists(self):
     navigate_to(self, 'All')
     for page in paginator.pages():
         if sel.is_displayed(Quadicon(self.name, 'host')):
             return True
     else:
         return False
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:7,代码来源:host.py

示例2: discover

def discover(credential, cancel=False, d_type="Amazon"):
    """
    Discover cloud providers. Note: only starts discovery, doesn't
    wait for it to finish.

    Args:
      credential (cfme.Credential):  Amazon discovery credentials.
      cancel (boolean):  Whether to cancel out of the discover UI.
    """
    navigate_to(Provider, "Discover")
    form_data = {"discover_select": d_type}
    if credential:
        form_data.update(
            {
                "username": credential.principal,
                "password": credential.secret,
                "password_verify": credential.verify_secret,
            }
        )
    fill(
        discover_form,
        form_data,
        action=form_buttons.cancel if cancel else discover_form.start_button,
        action_always=True,
    )
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:25,代码来源:__init__.py

示例3: discover

def discover(rhevm=False, vmware=False, scvmm=False, cancel=False, start_ip=None, end_ip=None):
    """
    Discover infrastructure providers. Note: only starts discovery, doesn't
    wait for it to finish.

    Args:
        rhevm: Whether to scan for RHEVM providers
        vmware: Whether to scan for VMware providers
        scvmm: Whether to scan for SCVMM providers
        cancel:  Whether to cancel out of the discover UI.
        start_ip: String start of the IP range for discovery
        end_ip: String end of the IP range for discovery
    """
    navigate_to(Provider, 'Discover')
    form_data = {}
    if rhevm:
        form_data.update({'rhevm_chk': True})
    if vmware:
        form_data.update({'vmware_chk': True})
    if scvmm:
        form_data.update({'scvmm_chk': True})

    if start_ip:
        for idx, octet in enumerate(start_ip.split('.')):
            key = 'from_%i' % idx
            form_data.update({key: octet})
    if end_ip:
        end_octet = end_ip.split('.')[-1]
        form_data.update({'to_3': end_octet})

    fill(discover_form, form_data,
         action=form_buttons.cancel if cancel else discover_form.start_button,
         action_always=True)
开发者ID:rrasouli,项目名称:cfme_tests,代码行数:33,代码来源:__init__.py

示例4: test_clear_host_filter_results

def test_clear_host_filter_results(provider):
    """ Test for clearing filter results for hosts."""

    navigate_to(Host, 'All')
    list_acc.select('Filters', 'Status / Stopped', by_title=False)
    pytest.sel.click(search_box.clear_advanced_search)
    page_title = pytest.sel.text(host.page_title_loc)
    assert page_title == 'Hosts', 'Clear filter results failed'
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:8,代码来源:test_set_default_filter.py

示例5: test_openstack_provider_has_api_version

def test_openstack_provider_has_api_version():
    """Check whether the Keystone API version field is present for Openstack."""
    prov = Provider()
    navigate_to(prov, 'Add')
    fill(prop_region.properties_form, {"type_select": "OpenStack"})
    pytest.sel.wait_for_ajax()
    assert pytest.sel.is_displayed(
        prov.properties_form.api_version), "API version select is not visible"
开发者ID:rrasouli,项目名称:cfme_tests,代码行数:8,代码来源:test_providers.py

示例6: exists

 def exists(self):
     try:
         navigate_to(self, "All")
         quad = Quadicon(self.name, self.quad_name)
         if sel.is_displayed(quad):
             return True
     except sel.NoSuchElementException:
         return False
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:8,代码来源:resource_pool.py

示例7: has_valid_credentials

    def has_valid_credentials(self):
        """ Check if host has valid credentials saved

        Returns: ``True`` if credentials are saved and valid; ``False`` otherwise
        """
        navigate_to(self, 'All')
        quad = Quadicon(self.name, 'host')
        return 'checkmark' in quad.creds
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:8,代码来源:host.py

示例8: delete

 def delete(self, cancel=False):
     navigate_to(self, 'Details')
     if version.current_version() >= '5.7':
         btn_name = "Remove Dialog"
     else:
         btn_name = "Remove from the VMDB"
     cfg_btn(btn_name, invokes_alert=True)
     sel.handle_alert(cancel)
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:8,代码来源:provisioning_dialogs.py

示例9: execute_button

 def execute_button(self, button_group, button, cancel=True):
     navigate_to(self, 'Details')
     host_btn = partial(tb.select, button_group)
     host_btn(button, invokes_alert=True)
     sel.click(form_buttons.submit)
     flash.assert_success_message("Order Request was Submitted")
     host_btn(button, invokes_alert=True)
     sel.click(form_buttons.cancel)
     flash.assert_success_message("Service Order was cancelled by the user")
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:host.py

示例10: get_detail

    def get_detail(self, *ident):
        """ Gets details from the details infoblock

        Args:
            *ident: An InfoBlock title, followed by the Key name, e.g. "Relationships", "Images"
        Returns: A string representing the contents of the InfoBlock's value.
        """
        navigate_to(self, 'Details')
        return details_page.infoblock.text(*ident)
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:__init__.py

示例11: delete

    def delete(self, cancel=True):
        """Deletes a resource pool from CFME

        Args:
            cancel: Whether to cancel the deletion, defaults to True
        """
        navigate_to(self, "Details")
        cfg_btn("Remove from the VMDB", invokes_alert=True)
        sel.handle_alert(cancel=cancel)
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:resource_pool.py

示例12: test_filter_without_user_input

def test_filter_without_user_input(hosts, hosts_with_vm_count, host_with_median_vm):
    navigate_to(Host, 'All')
    median_host, median_vm_count = host_with_median_vm
    # We will filter out hosts with less than median VMs
    more_than_median_hosts = list(dropwhile(lambda h: h[1] <= median_vm_count, hosts_with_vm_count))
    # Set up the filter
    search.fill_and_apply_filter(get_expression(False).format(median_vm_count))
    assert_no_cfme_exception()
    assert len(more_than_median_hosts) == len(host.get_all_hosts(do_not_navigate=True))
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:test_advanced_search_host.py

示例13: hosts

def hosts():
    """Ensure the infra providers are set up and get list of hosts"""
    try:
        setup_a_provider(prov_class="infra")
    except Exception:
        pytest.skip("It's not possible to set up any providers, therefore skipping")
    navigate_to(Host, 'All')
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:test_advanced_search_host.py

示例14: wait_for_appear

 def wait_for_appear(self):
     navigate_to(self, "All")
     wait_for(
         lambda: self.exists,
         fail_condition=False,
         message="Wait resource pool to appear",
         num_sec=1000,
         fail_func=sel.refresh,
     )
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:resource_pool.py

示例15: test_filter_save_cancel

def test_filter_save_cancel(hosts, hosts_with_vm_count, host_with_median_vm):
    navigate_to(Host, 'All')
    median_host, median_vm_count = host_with_median_vm
    filter_name = fauxfactory.gen_alphanumeric()
    # Try save filter
    search.save_filter(get_expression(True), filter_name, cancel=True)
    assert_no_cfme_exception()
    with pytest.raises(pytest.sel.NoSuchElementException):
        search.load_filter(filter_name)  # does not exist
开发者ID:anewmanRH,项目名称:cfme_tests,代码行数:9,代码来源:test_advanced_search_host.py


注:本文中的utils.appliance.endpoints.ui.navigate_to函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。