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


Python Home.get_url_current_page方法代码示例

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


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

示例1: test_that_breadcrumb_links_in_details_page_work

# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import get_url_current_page [as 别名]
    def test_that_breadcrumb_links_in_details_page_work(self, mozwebqa):
        """
        Litmus 11923
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=11923
        """
        home_page = Home(mozwebqa)
        detail_page = Details(mozwebqa, "firebug")

        Assert.true(detail_page.is_breadcrumb_menu_visible)

        Assert.equal(detail_page.breadcrumbs[0].name, "Add-ons for Firefox")
        link = detail_page.breadcrumbs[0].link_value
        detail_page.breadcrumbs[0].click()

        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[1].name, "Extensions")
        link = detail_page.breadcrumbs[1].link_value
        detail_page.breadcrumbs[1].click()

        amo_extenstions_page = ExtensionsHome(mozwebqa)
        Assert.true(amo_extenstions_page.is_the_current_page)
        Assert.true(amo_extenstions_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[2].name, "Firebug")
开发者ID:jsj0809,项目名称:Addon-Tests,代码行数:32,代码来源:test_details_page.py

示例2: test_that_clicking_mozilla_logo_loads_mozilla_dot_org

# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import get_url_current_page [as 别名]
 def test_that_clicking_mozilla_logo_loads_mozilla_dot_org(self, mozwebqa):
     """
     Litmus 22922
     https://litmus.mozilla.org/show_test.cgi?id=22922
     """
     home_page = Home(mozwebqa)
     Assert.true(home_page.is_mozilla_logo_visible)
     home_page.click_mozilla_logo()
     Assert.equal(home_page.get_url_current_page(), "http://www.mozilla.org/")
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:11,代码来源:test_layout.py

示例3: test_that_themes_categories_are_listed_on_left_hand_side

# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import get_url_current_page [as 别名]
 def test_that_themes_categories_are_listed_on_left_hand_side(self, mozwebqa):
     """ test for litmus 15342"""
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     current_page_url = home_page.get_url_current_page()
     Assert.true(current_page_url.endswith("/themes/"))
     default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"]
     Assert.equal(themes_page.categories_count, len(default_categories))
     count = 0
     for category in default_categories:
         count += 1
         current_category = themes_page.get_category(count)
         Assert.equal(category, current_category)
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:15,代码来源:test_themes.py

示例4: test_other_applications_thunderbird

# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import get_url_current_page [as 别名]
    def test_other_applications_thunderbird(self, mozwebqa):
        """ Test for litmus 5037
            https://litmus.mozilla.org/show_test.cgi?id=5037
        """

        home_page = Home(mozwebqa)

        home_page.header.click_other_applications()
        home_page.header.click_thunderbird()
        Assert.true("thunderbird" in home_page.get_url_current_page())

        home_page.header.click_other_applications()
        Assert.false(home_page.header.is_thunderbird_visible())
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:15,代码来源:test_layout.py


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