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


Python AddonsHomePage.search_for方法代码示例

本文整理汇总了Python中addons_site.AddonsHomePage.search_for方法的典型用法代码示例。如果您正苦于以下问题:Python AddonsHomePage.search_for方法的具体用法?Python AddonsHomePage.search_for怎么用?Python AddonsHomePage.search_for使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在addons_site.AddonsHomePage的用法示例。


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

示例1: test_that_character_escaping_doesnt_go_into_the_test

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_character_escaping_doesnt_go_into_the_test(self, testsetup):
     """ Test for Litmus 4857
         https://litmus.mozilla.org/show_test.cgi?id=4857"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("personas%20plus")
     Assert.true(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.true("0 - 0 of 0" in results_summary)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例2: test_that_searching_with_numerals_returns_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_with_numerals_returns_results(self, testsetup):
     """
     Litmus 17347
     https://litmus.mozilla.org/show_test.cgi?id=17347
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("1")
     Assert.true(amo_search_page.result_count > 0)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例3: test_that_verify_the_breadcrumb_on_search_results_page

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_verify_the_breadcrumb_on_search_results_page(self, testsetup):
     """
     Litmus 17341
     https://litmus.mozilla.org/show_test.cgi?id=17341
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("text")
     Assert.equal(amo_search_page.breadcrumbs_value, 'Add-ons for Firefox Search')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例4: test_that_searching_for_twitter_returns_yoono

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_for_twitter_returns_yoono(self, testsetup):
     """
     Litmus 17354
     https://litmus.mozilla.org/show_test.cgi?id=17354
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("twitter")
     Assert.equal(amo_search_page.result(0).name, 'Yoono: Twitter Facebook LinkedIn YouTube GTalk AIM')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例5: test_that_searching_for_cool_returns_cooliris

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_for_cool_returns_cooliris(self, testsetup):
     """
     Litmus 17353
     https://litmus.mozilla.org/show_test.cgi?id=17353
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("Cool")
     Assert.equal(amo_search_page.result(0).name, 'Cooliris')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例6: test_that_page_with_search_results_has_correct_title

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_page_with_search_results_has_correct_title(self, testsetup):
     """ Litmus 17338
         https://litmus.mozilla.org/show_test.cgi?id=17338 """
     amo_home_page = AddonsHomePage(testsetup)
     search_keyword = 'Search term'
     amo_search_page = amo_home_page.search_for(search_keyword)
     expected_title = 'Add-on Search Results for %s :: Add-ons for Firefox' % search_keyword
     Assert.equal(expected_title, amo_search_page.page_title)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例7: test_that_searching_for_fire_returns_firebug

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_for_fire_returns_firebug(self, testsetup):
     """
     Litmus 15314
     https://litmus.mozilla.org/show_test.cgi?id=15314
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("fire")
     Assert.equal(amo_search_page.result(0).name, 'Firebug')
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例8: test_that_entering_a_long_string_returns_no_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_entering_a_long_string_returns_no_results(self, testsetup):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("a" * 255)
     Assert.true(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.true("0 - 0 of 0" in results_summary)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例9: test_that_entering_a_long_string_returns_no_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_entering_a_long_string_returns_no_results(self):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(self.selenium)
     amo_search_page = amo_home_page.search_for("a" * 255)
     self.assertTrue(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     self.assertTrue("0 - 0 of 0" in results_count)
开发者ID:rivlinp,项目名称:Addon-Tests,代码行数:10,代码来源:test_search.py

示例10: test_that_searching_with_unicode_characters_returns_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_with_unicode_characters_returns_results(self, testsetup):
     """ Litmus 9575
         https://litmus.mozilla.org/show_test.cgi?id=9575 """
     amo_home_page = AddonsHomePage(testsetup)
     search_str = u'\u0421\u043b\u043e\u0432\u0430\u0440\u0438 \u042f\u043d\u0434\u0435\u043a\u0441'
     amo_search_page = amo_home_page.search_for(search_str)
     Assert.true(amo_search_page.is_text_present(search_str))
     results_summary = amo_search_page.results_summary
     Assert.false("0 - 0 of 0" in results_summary)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:11,代码来源:test_search.py

示例11: test_that_search_returns_top_1000_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
    def test_that_search_returns_top_1000_results(self, testsetup):

        amo_home_page = AddonsHomePage(testsetup)
        amo_search_page = amo_home_page.search_for("a")

        results = amo_search_page.results_summary
        total_results = results.split(' ')[5]

        Assert.equal(total_results, '1000')
开发者ID:bloodaxealin,项目名称:Addon-Tests,代码行数:11,代码来源:test_search.py

示例12: test_that_blank_search_returns_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_blank_search_returns_results(self, testsetup):
     """ Litmus 11759
         https://litmus.mozilla.org/show_test.cgi?id=11759 """               
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("")     
     Assert.false(amo_search_page.is_text_present("Search is currently unavailable"))
     Assert.false(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     Assert.false("0 - 0 of 0" in results_count)
开发者ID:tcarpentier,项目名称:Addon-Tests,代码行数:11,代码来源:test_search.py

示例13: test_that_searching_for_a_tag_returns_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_for_a_tag_returns_results(self, testsetup):
     """
     Litmus 7848
     https://litmus.mozilla.org/show_test.cgi?id=7848
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("development")
     Assert.true(amo_search_page.result_count > 0)
     Assert.equal(amo_search_page.refine_results.tag("development").name, "development")
     Assert.true(amo_search_page.refine_results.tag_count > 1)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:12,代码来源:test_search.py

示例14: test_that_searching_with_substrings_returns_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
 def test_that_searching_with_substrings_returns_results(self, testsetup):
     """ Litmus 9561
         https://litmus.mozilla.org/show_test.cgi?id=9561 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("fox")
     Assert.false(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.false("0 - 0 of 0" in results_summary)
     matches = re.search(self._total_count_regex, results_summary)
     Assert.true(int(matches.group(1)) > 1)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:12,代码来源:test_search.py

示例15: test_that_search_all_add_ons_results_have_pagination_that_moves_through_results

# 需要导入模块: from addons_site import AddonsHomePage [as 别名]
# 或者: from addons_site.AddonsHomePage import search_for [as 别名]
    def test_that_search_all_add_ons_results_have_pagination_that_moves_through_results(self, testsetup):
        """ Test for litmus 4839
            https://litmus.mozilla.org/show_test.cgi?id=4839
        """
        amo_home_page = AddonsHomePage(testsetup)
        amo_search_page = amo_home_page.search_for("addon")
        first_expected = 1
        second_expected = 20

        # Go Forward 10 times
        for i in range(10):
            amo_search_page.page_forward()
            results_summary = amo_search_page.results_summary

            matches = re.search(self._count_regex, results_summary)
            first_count = matches.group(1)
            second_count = matches.group(2)

            first_expected += 20
            second_expected += 20
            Assert.equal(str(first_expected), first_count)
            Assert.equal(str(second_expected), second_count)

        # Go Back 10 Times
        for i in range(10):
            amo_search_page.page_back()
            results_summary = amo_search_page.results_summary

            matches = re.search(self._count_regex, results_summary)
            first_count = matches.group(1)
            second_count = matches.group(2)

            first_expected -= 20
            second_expected -= 20
            Assert.equal(str(first_expected), first_count)
            Assert.equal(str(second_expected), second_count)
开发者ID:vish-moz,项目名称:Addon-Tests,代码行数:38,代码来源:test_search.py


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