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


Python basepageelement.Link类代码示例

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


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

示例1: GroupsTitle2

class GroupsTitle2(BasePageWidget):
    def __init__(self, owner, locatordict={}):
        super(GroupsTitle2,self).__init__(owner,locatordict)

        # load hub's classes
        GroupsTitle_Locators = self.load_class('GroupsTitle_Locators')

        # update this object's locator
        self.locators.update(GroupsTitle_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.title = Link(self,{'base':'title'})

        # update the component's locators with this objects overrides
        self._updateLocators()

    def get_title(self):
        """return the title of the group"""

        return self.title.text()

    def goto_title(self):
        """click the group title link"""

        return self.title.click()
开发者ID:codedsk,项目名称:hubcheck,代码行数:28,代码来源:groups_title.py

示例2: __init__

    def __init__(self, owner, locatordict={}):
        super(Header2,self).__init__(owner,locatordict)

        # load hub's classes
        Header_Locators = self.load_class('Header_Locators')

        # update this object's locator
        self.locators.update(Header_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.login          = Link(self,{'base':'login'})
        self.register       = Link(self,{'base':'register'})
        self.logout         = Link(self,{'base':'logout'})
        self.details        = Link(self,{'base':'details'})
        self.dashboard      = Link(self,{'base':'dashboard'})
        self.messages       = Link(self,{'base':'messages'})
        self.profile        = Link(self,{'base':'profile'})

        # self.search    = Search(self,'search')

        self._links = ['details','dashboard','messages','profile','logout']

        # update the component's locators with this objects overrides
        self._updateLocators()
开发者ID:codedsk,项目名称:hubcheck,代码行数:27,代码来源:header.py

示例3: ToolsStatusWhatsNextApproved

class ToolsStatusWhatsNextApproved(BasePageWidget):
    def __init__(self, owner, locatordict={}):
        super(ToolsStatusWhatsNextApproved,self).__init__(owner,locatordict)

        # load hub's classes
        ToolsStatusWhatsNextApproved_Locators = self.load_class('ToolsStatusWhatsNextApproved_Locators')

        # update this object's locator
        self.locators.update(ToolsStatusWhatsNextApproved_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.tool_page = Link(self,{'base':'tool_page'})

        # update the component's locators with this objects overrides
        self._updateLocators()


    def goto_tool_page(self):

        self.tool_page.click()


    def get_tool_page_name(self):

        return self.tool_page.text


    def get_time_since_request(self):

        pass
开发者ID:codedsk,项目名称:hubcheck,代码行数:33,代码来源:tools_status_whats_next_approved.py

示例4: __init__

    def __init__(self, owner, locatordict={},row_number=0):

        super(AdminDatabaseTableListItem1,self)\
            .__init__(owner,locatordict,row_number)

        # load hub's classes
        AdminDatabaseTableListItem_Locators = \
            self.load_class('AdminDatabaseTableListItem_Locators')

        # update this object's locator
        self.locators.update(AdminDatabaseTableListItem_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.name       = TextReadOnly(self,{'base':'name'})
        self.created    = TextReadOnly(self,{'base':'created'})
        self.updated    = TextReadOnly(self,{'base':'updated'})
        self.records    = TextReadOnly(self,{'base':'records'})
        self.schema     = Link(self,{'base':'schema'})
        self.view_data  = Link(self,{'base':'view_data'})
        self.manage_data = Link(self,{'base':'manage_data'})

        # update the component's locators with this objects overrides
        self._updateLocators()
开发者ID:codedsk,项目名称:hubcheck,代码行数:26,代码来源:admin_database_table_list_item.py

示例5: GroupsWikiEditForm3

class GroupsWikiEditForm3(GroupsWikiNewForm3):
    """GroupsWikiEditForm

       TextArea widget for pagetext
       Upload3 file upload widget with embedded iframes
    """

    def __init__(self, owner, locatordict={}):
        super(GroupsWikiEditForm3,self).__init__(owner,locatordict)

        # load hub's classes
        GroupsWikiEditForm_Locators = self.load_class('GroupsWikiEditForm_Locators')

        # update this object's locator
        self.locators.update(GroupsWikiEditForm_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.rename = Link(self,{'base':'rename'})

        # update the component's locators with this objects overrides
        self._updateLocators()


    def goto_rename(self):
        """click the rename link"""

        self.rename.click()
开发者ID:codedsk,项目名称:hubcheck,代码行数:30,代码来源:groups_wiki_edit_form.py

示例6: __init__

    def __init__(self, owner, locatordict={}):
        super(ToolSessionApp,self).__init__(owner,locatordict)

        # load hub's classes
        ToolSessionApp_Locators = self.load_class('ToolSessionApp_Locators')
        ToolSessionAppStorage = self.load_class('ToolSessionAppStorage')

        # update this object's locator
        self.locators.update(ToolSessionApp_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.title      = Text(self,{'base':'title'})
        self.terminate  = Link(self,{'base':'terminate'})
        self.keep       = Link(self,{'base':'keep'})
        self.storage    = ToolSessionAppStorage(self,{'base':'storage'})
        self.popout     = Link(self,{'base':'popout'})
        self.refresh    = Link(self,{'base':'refresh'})
        self.resize     = Link(self,{'base':'resize'})
        self.size       = TextReadOnly(self,{'base':'size'})

        # update the component's locators with this objects overrides
        self._updateLocators()
开发者ID:codedsk,项目名称:hubcheck,代码行数:25,代码来源:tool_session_app.py

示例7: __init__

    def __init__(self, owner, locatordict={}):
        super(ToolsStatusApproveToolInfoForm,self).__init__(owner,locatordict)

        # load hub's classes
        ToolsStatusApproveToolInfoForm_Locators = \
            self.load_class('ToolsStatusApproveToolInfoForm_Locators')

        # update this object's locator
        self.locators.update(ToolsStatusApproveToolInfoForm_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.tool_info          = Link(self,{'base':'tool_info'})
        self.title              = TextReadOnly(self,{'base':'title'})
        self.version            = TextReadOnly(self,{'base':'version'})
        self.version_edit       = Link(self,{'base':'version_edit'})
        self.description        = TextReadOnly(self,{'base':'description'})
        self.tool_access        = TextReadOnly(self,{'base':'tool_access'})
        self.code_access        = TextReadOnly(self,{'base':'code_access'})
        self.project_access     = TextReadOnly(self,{'base':'project_access'})
        self.screen_size        = TextReadOnly(self,{'base':'screen_size'})
        self.developers         = TextReadOnly(self,{'base':'developers'})
        self.authors            = TextReadOnly(self,{'base':'authors'})
        self.resource_preview   = Link(self,{'base':'resource_preview'})
        self.license_edit       = Link(self,{'base':'license_edit'})
        self.license            = TextReadOnly(self,{'base':'license'})
        self.approve            = Button(self,{'base':'approve'})


        # update the component's locators with this objects overrides
        self._updateLocators()
开发者ID:codedsk,项目名称:hubcheck,代码行数:33,代码来源:tools_status_approve_toolinfo_form.py

示例8: __init__

    def __init__(self, owner, locatordict={}):
        super(Login2,self).__init__(owner,locatordict)

        # load hub's classes
        Login_Locators = self.load_class('Login_Locators')

        # update this object's locator
        self.locators.update(Login_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.change_account = Link(self,{'base':'change_account'})
        self.hub_signin = Link(self,{'base':'hub_signin'})
        self.username  = Text(self,{'base':'username'})
        self.password  = Text(self,{'base':'password'})
        self.remember  = Checkbox(self,{'base':'remember'})
        self.remind    = Link(self,{'base':'remind'})
        self.reset     = Link(self,{'base':'reset'})
        self.register  = Link(self,{'base':'register'})

        self.fields += ['username','password','remember']

        # update the component's locators with this objects overrides
        self._updateLocators()
开发者ID:codedsk,项目名称:hubcheck,代码行数:26,代码来源:login_base.py

示例9: ToolsStatusWhatsNextPublished

class ToolsStatusWhatsNextPublished(BasePageWidget):
    def __init__(self, owner, locatordict={}):
        super(ToolsStatusWhatsNextPublished, self).__init__(owner, locatordict)

        # load hub's classes
        ToolsStatusWhatsNextPublished_Locators = self.load_class("ToolsStatusWhatsNextPublished_Locators")

        # update this object's locator
        self.locators.update(ToolsStatusWhatsNextPublished_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.tool_page = Link(self, {"base": "tool_page"})
        self.updated = Link(self, {"base": "updated"})

        # update the component's locators with this objects overrides
        self._updateLocators()

    def goto_tool_page(self):

        self.tool_page.click()

    def get_tool_page_name(self):

        return self.tool_page.text

    def flip_status_to_updated(self):

        self.updated.click()
开发者ID:codedsk,项目名称:hubcheck,代码行数:31,代码来源:tools_status_whats_next_published.py

示例10: AdminDatabaseBackupPage

class AdminDatabaseBackupPage(AdminBasePage):
    """admin database list page object"""

    def __init__(self,browser,catalog):
        super(AdminDatabaseBackupPage,self).__init__(browser,catalog)
        # this path needs a database associated with it
        # ex:
        # /administrator/index.php?option=com_databases&task=backup_list&db=solarpv
        self.path = '/administrator/index.php?option=com_databases'\
                    + '&task=backup_list'
#                    + '&db=%s' % (dbname)

        # load hub's classes
        AdminDatabaseBackupPage_Locators = \
            self.load_class('AdminDatabaseBackupPage_Locators')
        AdminDatabaseBackup = self.load_class('AdminDatabaseBackup')

        # update this object's locator
        self.locators.update(AdminDatabaseBackupPage_Locators.locators)

        # setup page object's components
        self.back = Link(self,{'base':'back'})
        self.backup = AdminDatabaseBackup(self,{'base':'backup'})


    def goto_back(self):

        self.back.click()
开发者ID:codedsk,项目名称:hubcheck,代码行数:28,代码来源:po_admin_database_backup_page.py

示例11: ToolsStatusApproveConfirmLicensePage

class ToolsStatusApproveConfirmLicensePage(GenericPage):
    def __init__(self,browser,catalog,toolname=''):
        super(ToolsStatusApproveConfirmLicensePage,self)\
            .__init__(browser,catalog)
        self.path = '/tools/%s/license?action=confirm' % (toolname)

        # load hub's classes
        ToolsStatusApproveConfirmLicensePage_Locators = \
            self.load_class(
            'ToolsStatusApproveConfirmLicensePage_Locators')
        ToolsStatusApproveLicenseForm = \
            self.load_class('ToolsStatusApproveLicenseForm')

        # update this object's locator
        self.locators.update(
            ToolsStatusApproveConfirmLicensePage_Locators.locators)

        # setup page object's components
        self.tool_status  = Link(self,{'base':'tool_status'})
        self.new_tool  = Link(self,{'base':'new_tool'})
        self.license_form = ToolsStatusApproveLicenseForm(self)

    def goto_tool_status(self):
        return self.tool_status.click()

    def goto_new_tool(self):
        return self.new_tool.click()

    def populate_form(self,data):
        return self.license_form.populate_form(data)

    def submit_form(self,data={}):
        return self.license_form.submit_form(data)
开发者ID:codedsk,项目名称:hubcheck,代码行数:33,代码来源:po_tools_status_approve_confirm_license_page.py

示例12: TagsBrowseResultsRow1

class TagsBrowseResultsRow1(ItemListItem):

    def __init__(self, owner, locatordict={}, row_number=0):

        super(TagsBrowseResultsRow1,self).__init__(owner,locatordict,row_number)

        # load hub's classes
        TagsBrowseResultsRow_Locators = self.load_class('TagsBrowseResultsRow_Locators')

        # update this object's locator
        self.locators.update(TagsBrowseResultsRow_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.name     = Link(self,{'base':'name'})
        self.count    = TextReadOnly(self,{'base':'count'})

        # update the component's locators with this objects overrides
        self._updateLocators()


    def value(self):
        """return a dictionary with the name and count properties of the tag"""

        return({'name':self.name.text(), 'count':int(self.count.value)})


    def goto_tag(self):
        """click the tag"""

        self.name.click()
开发者ID:codedsk,项目名称:hubcheck,代码行数:33,代码来源:tags_browse_results_row.py

示例13: AdminLogin1

class AdminLogin1(BasePageWidget):
    def __init__(self, owner, locatordict={}):
        super(AdminLogin1,self).__init__(owner,locatordict)

        # load hub's classes
        AdminLogin_Locators = self.load_class('AdminLogin_Locators')

        # update this object's locator defaults
        self.locators.update(AdminLogin_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.username  = Text(self,{'base':'username'})
        self.password  = Text(self,{'base':'password'})
        self.submit    = Link(self,{'base':'submit'})

        # update the component's locators with this objects overrides
        self._updateLocators()

    def login_as(self,username,password):
        self.username.value = username
        self.password.value = password
        self.submit.click()
开发者ID:codedsk,项目名称:hubcheck,代码行数:25,代码来源:admin_login.py

示例14: __init__

    def __init__(self, owner, locatordict={}):
        super(TicketListSearchResultRow, self).__init__(owner, locatordict)

        # load hub's classes
        TicketListSearchResultRow_Locators = self.load_class("TicketListSearchResultRow_Locators")
        TagsList = self.load_class("TagsList")

        # update this object's locator
        self.locators.update(TicketListSearchResultRow_Locators.locators)

        # update the locators with those from the owner
        self.update_locators_from_owner()

        # setup page object's components
        self.ticketnumber = TextReadOnly(self, {"base": "ticketnumber"})
        self.summary = Link(self, {"base": "summary"})
        self.status = TextReadOnly(self, {"base": "status"})
        self.group = TextReadOnly(self, {"base": "group"})
        self.tags = TagsList(self, {"base": "tags"})
        self.assignee = TextReadOnly(self, {"base": "assignee"})
        # self.age          = TextReadOnly(self,{'base':'age'})
        # self.comments     = TextReadOnly(self,{'base':'comments'})
        self.delete = Link(self, {"base": "delete"})

        # update the component's locators with this objects overrides
        self._updateLocators()
开发者ID:codedsk,项目名称:hubcheck,代码行数:26,代码来源:ticket_list_search_result_row.py

示例15: goto_page_number

    def goto_page_number(self, pagenumber):
        """click on a specific page in the pagination list"""

        # perform input validation
        pagenumber = int(pagenumber)

        if pagenumber < 1:
            raise IndexError(
                "pagenumber out of range: expected value\
                >= 1, received %s"
                % (pagenumber)
            )

        available_pages = self.get_link_page_numbers()
        if len(available_pages) == 0:
            if pagenumber != 1:
                raise IndexError("no pages available, pagenumber must be == 1")

        max_page_number = max([int(i) for i in available_pages])

        if pagenumber > max_page_number:
            raise IndexError(
                "pagenumber out of range: expected value\
                <= %i, received %d"
                % (max_page_number, pagenumber)
            )

        # click the page number link
        loctxt = self.locators["page"] % int(pagenumber)
        self.locators["_pagelink"] = loctxt
        page = Link(self, {"base": "_pagelink"})
        page.detach_from_owner()
        page.click()
        del page
        del self.locators["_pagelink"]
开发者ID:codedsk,项目名称:hubcheck,代码行数:35,代码来源:listpagenav.py


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