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


Python CheckboxTable.click_row_by_cells方法代碼示例

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


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

示例1: CheckboxTable

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import toolbar as tb, CheckboxTable
from cfme.web_ui.menu import nav
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_services',
    {
        'containers_service':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Name': ctx['service'].name, 'Provider': ctx['service'].provider.name}),

        'containers_service_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Name': ctx['service'].name, 'Provider': ctx['service'].provider.name}),
    }
)


class Service(Taggable, SummaryMixin):

    def __init__(self, name, provider):
        self.name = name
        self.provider = provider

    def _on_detail_page(self):
        return sel.is_displayed(
            '//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
開發者ID:FilipB,項目名稱:cfme_tests,代碼行數:34,代碼來源:service.py

示例2: CheckboxTable

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import toolbar as tb, CheckboxTable
from cfme.web_ui.menu import nav
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_replicators',
    {
        'containers_replicator':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Name': ctx['replicator'].name, 'Provider': ctx['replicator'].provider.name}),

        'containers_replicator_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Name': ctx['replicator'].name, 'Provider': ctx['replicator'].provider.name}),
    }
)


class Replicator(Taggable, SummaryMixin):

    def __init__(self, name, provider):
        self.name = name
        self.provider = provider

    def _on_detail_page(self):
        return sel.is_displayed('//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
        if not self._on_detail_page():
開發者ID:FilipB,項目名稱:cfme_tests,代碼行數:34,代碼來源:replicator.py

示例3: CheckboxTable

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import CheckboxTable, toolbar as tb
from cfme.web_ui.menu import nav
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_containers',
    {
        'containers_container':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Name': ctx['container'].name, 'Pod Name': ctx['container'].pod.name}),

        'containers_container_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Name': ctx['container'].name, 'Pod Name': ctx['container'].pod.name}),
    }
)


class Container(Taggable, SummaryMixin):

    def __init__(self, name, pod):
        self.name = name
        self.pod = pod

    def _on_detail_page(self):
        return sel.is_displayed(
            '//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
開發者ID:FilipB,項目名稱:cfme_tests,代碼行數:34,代碼來源:container.py

示例4: MiddlewareDatasource

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
                                   t_mds.properties).join(t_ms,
                                            t_mds.server_id == t_ms.id).join(t_ems,
                                            t_mds.ems_id == t_ems.id)
    if name:
        query = query.filter(t_mds.name == name)
    if server:
        query = query.filter(t_mds.nativeid.like('%{}%'.format(server)))
    if provider:
        query = query.filter(t_ems.name == provider)
    return query

nav.add_branch(
    'middleware_datasources', {
        'middleware_datasource': lambda ctx: list_tbl.select_row('Datasource Name', ctx['name']),
        'middleware_datasource_detail':
            lambda ctx: list_tbl.click_row_by_cells({'Datasource Name': ctx['name']}),
    }
)


class MiddlewareDatasource(MiddlewareBase, Taggable):
    """
    MiddlewareDatasource class provides details on datasource page.
    Class methods available to get existing datasources list

    Args:
        name: Name of the datasource
        provider: Provider object (HawkularProvider)
        id: Native id (internal id) of datasource
        server: Server name of the datasource
        properties: Datasource driver name, connection URL and JNDI name
開發者ID:MattLombana,項目名稱:cfme_tests,代碼行數:33,代碼來源:datasource.py

示例5: MiddlewareDeployment

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
                                   t_md.ems_ref, t_ms.name, t_ems.name).join(t_ms,
                                            t_md.server_id == t_ms.id).join(t_ems,
                                            t_md.ems_id == t_ems.id)
    if name:
        query = query.filter(t_md.name == name)
    if server:
        query = query.filter(t_md.nativeid.like('%{}%'.format(server)))
    if provider:
        query = query.filter(t_ems.name == provider)
    return query

nav.add_branch(
    'middleware_deployments', {
        'middleware_deployment': lambda ctx: list_tbl.select_row('Deployment Name', ctx['name']),
        'middleware_deployment_detail':
            lambda ctx: list_tbl.click_row_by_cells({'Deployment Name': ctx['name']}),
    }
)


class MiddlewareDeployment(MiddlewareBase):
    """
    MiddlewareDeployment class provides details on deployment page.
    Class methods available to get existing deployments list

    Args:
        name: Name of the deployment
        provider: Provider object (HawkularProvider)
        id: Native id (internal id) of deployment
        server: Server name of the deployment
開發者ID:MattLombana,項目名稱:cfme_tests,代碼行數:32,代碼來源:deployment.py

示例6: CheckboxTable

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
from cfme.common import SummaryMixin, Taggable
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import CheckboxTable, toolbar as tb
from cfme.web_ui.menu import nav

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_image_registries',
    {
        'containers_image_registry':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Host': ctx['image_registry'].host, 'Provider': ctx['image_registry'].provider.name}),

        'containers_image_registry_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Host': ctx['image_registry'].host, 'Provider': ctx['image_registry'].provider.name}),
    }
)


class ImageRegistry(Taggable, SummaryMixin):

    def __init__(self, host, provider):
        self.host = host
        self.provider = provider

    def load_details(self, refresh=False):
        if not self._on_detail_page():
            self.navigate(detail=True)
        elif refresh:
            tb.refresh()
開發者ID:FilipB,項目名稱:cfme_tests,代碼行數:34,代碼來源:image_registry.py

示例7: cfmedb

# 需要導入模塊: from cfme.web_ui import CheckboxTable [as 別名]
# 或者: from cfme.web_ui.CheckboxTable import click_row_by_cells [as 別名]
    t_ems = cfmedb()['ext_management_systems']
    query = cfmedb().session.query(t_ms.name, t_ms.feed,
                                   t_ms.product, t_ems.name).join(t_ems, t_ms.ems_id == t_ems.id)
    if name:
        query = query.filter(t_ms.name == name)
    if server:
        query = query.filter(t_ms.nativeid.like('%{}%'.format(server)))
    if provider:
        query = query.filter(t_ems.name == provider)
    return query

nav.add_branch(
    'middleware_servers', {
        'middleware_server': lambda ctx: list_tbl.select_row('Server Name', ctx['name']),
        'middleware_server_detail':
            lambda ctx: list_tbl.click_row_by_cells({'Server Name': ctx['name']}),
    }
)


class MiddlewareServer(MiddlewareBase, Taggable):
    """
    MiddlewareServer class provides actions and details on Server page.
    Class method available to get existing servers list

    Args:
        name: name of the server
        provider: Provider object (HawkularProvider)
        product: Product type of the server
        id: Native id(internal id) of the server
開發者ID:MattLombana,項目名稱:cfme_tests,代碼行數:32,代碼來源:server.py


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