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


Python FeedbackPage.search_for方法代碼示例

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


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

示例1: test_search_pagination

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_search_pagination(self, mozwebqa):
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()
        # Set the date range to 2013-01-01 -> today so that we're more
        # likely to have so many messages in the results that it
        # paginates. Otherwise it might not paginate on stage or local
        # environments.
        feedback_pg.set_date_range('2013-01-01')
        feedback_pg.search_for(self.SEARCH_TERM)

        # Check the total message count. If it's less than 50 (two
        # pages worth), then we will fail with a helpful message.
        Assert.greater(feedback_pg.total_message_count, 50, "Search term didn't kick up enough messages. Please prime the server with more data!")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_not_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')

        feedback_pg.click_older_messages()
        Assert.equal(feedback_pg.search_term_from_url, self.SEARCH_TERM)

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.newer_messages_link, 'Newer Messages')
        Assert.equal(feedback_pg.page_from_url, 2)

        feedback_pg.click_newer_messages()
        Assert.equal(feedback_pg.search_term_from_url, self.SEARCH_TERM)

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_not_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.page_from_url, 1)
開發者ID:B-Rich,項目名稱:fjord,代碼行數:36,代碼來源:test_pagination.py

示例2: test_that_empty_search_of_feedback_returns_some_data

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_that_empty_search_of_feedback_returns_some_data(self, mozwebqa):
        """Litmus 13847"""
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for('')
        Assert.greater(len(feedback_pg.messages), 0)
開發者ID:chirarobert,項目名稱:input-tests,代碼行數:9,代碼來源:test_search.py

示例3: test_search_pagination

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_search_pagination(self, mozwebqa):
        """Litmus 13636 - Input: Verify Search results have pagination."""
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for("facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.false(feedback_pg.is_newer_messages_link_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')

        feedback_pg.click_older_messages()
        Assert.equal(feedback_pg.search_term_from_url, "facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.newer_messages_link, 'Newer Messages')
        Assert.equal(feedback_pg.page_from_url, 2)

        feedback_pg.click_newer_messages()
        Assert.equal(feedback_pg.search_term_from_url, "facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.false(feedback_pg.is_newer_messages_link_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.page_from_url, 1)
開發者ID:glennhoward,項目名稱:input-tests,代碼行數:28,代碼來源:test_pagination.py

示例4: test_that_we_can_search_feedback_with_unicode

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_that_we_can_search_feedback_with_unicode(self, mozwebqa):
        """Litmus 13697"""
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for(u"p\xe1gina")
        Assert.greater(len(feedback_pg.messages), 0)
開發者ID:glennhoward,項目名稱:input-tests,代碼行數:9,代碼來源:test_search.py

示例5: test_that_we_can_search_feedback_with_unicode

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_that_we_can_search_feedback_with_unicode(self, mozwebqa):
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for(u"p\xe1gina")
        # There's no way to guarantee that the search we did finds
        # responses on the page. So we check for one of two possible
        # scenarios: existences of responses or a message count of 0.
        Assert.true(
            feedback_pg.no_messages
            or (len(feedback_pg.messages) > 0)
        )
開發者ID:B-Rich,項目名稱:fjord,代碼行數:14,代碼來源:test_search.py

示例6: test_that_we_can_search_feedback_with_unicode

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_that_we_can_search_feedback_with_unicode(self, mozwebqa):
        """Litmus 13697"""
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        # Select the Firefox version that is 1 less than the newest to ensure the unicode
        # search returns at least 1 result.
        feedback_pg.product_filter.select_product('firefox')
        feedback_pg.product_filter.select_version('--')

        feedback_pg.search_for(u"rapidit\xe9")
        Assert.greater(len(feedback_pg.messages), 0)
開發者ID:AlexLakatos,項目名稱:input-tests,代碼行數:14,代碼來源:test_search.py

示例7: test_search_pagination

# 需要導入模塊: from pages.desktop.feedback import FeedbackPage [as 別名]
# 或者: from pages.desktop.feedback.FeedbackPage import search_for [as 別名]
    def test_search_pagination(self, mozwebqa):
        """Litmus 13636 - Input: Verify Search results have pagination."""
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()
        feedback_pg.product_filter.select_version("--")
        feedback_pg.search_for("facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_visible)
        Assert.false(feedback_pg.is_newer_messages_link_enabled)

        Assert.equal(feedback_pg.older_messages_link, u"\xab Older Messages")
        Assert.equal(feedback_pg.newer_messages_link, u"Newer Messages \xbb")

        feedback_pg.click_older_messages()
        Assert.equal(feedback_pg.product_from_url, "firefox")
        Assert.equal(feedback_pg.search_term_from_url, "facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_visible)

        Assert.true(feedback_pg.is_older_messages_link_enabled)
        Assert.true(feedback_pg.is_newer_messages_link_enabled)

        Assert.equal(feedback_pg.older_messages_link, u"\xab Older Messages")
        Assert.equal(feedback_pg.newer_messages_link, u"Newer Messages \xbb")

        Assert.equal(feedback_pg.page_from_url, 2)

        feedback_pg.click_newer_messages()
        Assert.equal(feedback_pg.product_from_url, "firefox")
        Assert.equal(feedback_pg.search_term_from_url, "facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_visible)

        Assert.true(feedback_pg.is_older_messages_link_enabled)
        Assert.false(feedback_pg.is_newer_messages_link_enabled)

        Assert.equal(feedback_pg.older_messages_link, u"\xab Older Messages")
        Assert.equal(feedback_pg.newer_messages_link, u"Newer Messages \xbb")

        Assert.equal(feedback_pg.page_from_url, 1)
開發者ID:bobsilverberg,項目名稱:input-tests,代碼行數:45,代碼來源:test_pagination.py


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