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


Python PageProvider.do_search_on_search_query方法代码示例

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


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

示例1: test_search_returns_either_term

# 需要导入模块: from pages.desktop.page_provider import PageProvider [as 别名]
# 或者: from pages.desktop.page_provider.PageProvider import do_search_on_search_query [as 别名]
    def test_search_returns_either_term(self, mozwebqa):
        """Search looks for either of two search terms

        Search using a good search term with a junk search term
        should return same as only the good search term

        """

        good_search_term = "firefox"
        junk_search_term = "werpadfjka"

        search_page_obj = PageProvider(mozwebqa).search_page()

        # search with good search term only.  save first search result.
        search_page_obj.do_search_on_search_query(good_search_term)
        Assert.true(search_page_obj.is_result_present, "1st search has no results")
        result_search_1 = search_page_obj.get_result_text

        # search with junk search term following the good search term
        search_page_obj.do_search_on_search_box(" " + junk_search_term)
        Assert.true(search_page_obj.is_result_present, "Similar 2nd search has no results")

        result_search_2 = search_page_obj.get_result_text
        Assert.equal(result_search_1, result_search_2, "Similar searches have different results")
开发者ID:AlexLakatos,项目名称:sumo-tests,代码行数:26,代码来源:test_search.py


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