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


Python HomePage.go_to_home_page方法代码示例

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


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

示例1: testShouldCheckLibDeactivateAndActivate

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def testShouldCheckLibDeactivateAndActivate(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)
        loginpage_obj = LoginPage(mozwebqa)
        dashboardpage_obj = DashboardPage(mozwebqa)
        librarypage_obj = LibraryEditorPage(mozwebqa)

        homepage_obj.go_to_home_page()
        homepage_obj.header.click_signin()
        loginpage_obj.login()
        Assert.true(dashboardpage_obj.is_the_current_page)

        # go back to homepage, create a new library to work with
        dashboardpage_obj.header.click_home_logo()
        homepage_obj.click_create_lib_btn()
        library_name = librarypage_obj.library_name
        librarypage_obj.header.click_dashboard()

        #Click on the private button to make it private and then check that the library is not in the list anymore
        dashboardpage_obj.library(library_name).click_private()
        Assert.false(dashboardpage_obj.library(library_name).is_displayed, "Library %s found" % library_name)

        #Go to the private libraries page and check that the library that you just made private is present there.
        #Click on public to make it public and check on the dashboard that the library is present there.
        dashboardpage_obj.click_private_libraries_link()
        Assert.true(dashboardpage_obj.library(library_name).is_displayed, "Library %s not found" % library_name)

        # Switch it back to public - it should disappaer
        dashboardpage_obj.library(library_name).click_public()
        Assert.false(dashboardpage_obj.library(library_name).is_displayed, "Library %s found" % library_name)

        # Go to main dashboard, should be present
        dashboardpage_obj.header.click_dashboard()
        Assert.true(dashboardpage_obj.library(library_name).is_displayed, "Library %s not found" % library_name)

        dashboardpage_obj.delete_test_data()
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:37,代码来源:test_addon_lib_activate.py

示例2: testShouldCheckAddonLabel

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def testShouldCheckAddonLabel(self, mozwebqa):
        #This test is to check the labels of an add-on on the dashboard
        #Create page objects
        homepage_obj = HomePage(mozwebqa)
        loginpage_obj = LoginPage(mozwebqa)
        dashboardpage_obj = DashboardPage(mozwebqa)
        addonpage_obj = AddonEditorPage(mozwebqa)

        loginpage_obj.login()

        #Create an addon. Then go to dashboard and assert that the label is 'initial'.
        homepage_obj.go_to_home_page()
        homepage_obj.click_create_addon_btn()
        addon_name = addonpage_obj.addon_name

        homepage_obj.header.click_dashboard()
        Assert.true(dashboardpage_obj.is_the_current_page)
        Assert.true(dashboardpage_obj.addon(addon_name).is_displayed, "Addon %s not found" % addon_name)

        #Click on the edit button of the addon.Then create a copy of that addon and assert that the label is 'copy'
        dashboardpage_obj.addon(addon_name).click_edit()
        addonpage_obj.click_copy()
        copy_addon_name = addonpage_obj.addon_name

        try:
            Assert.not_equal(addon_name, copy_addon_name)
        except:
            print 'A copy of the addon could not be created'
        homepage_obj.header.click_dashboard()
        Assert.true(dashboardpage_obj.addon(copy_addon_name).is_displayed, "Addon %s not found" % copy_addon_name)

        dashboardpage_obj.delete_test_data()
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:34,代码来源:test_addon_label.py

示例3: testShouldCheckAddonDeactivateAndActivate

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def testShouldCheckAddonDeactivateAndActivate(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)
        loginpage_obj = LoginPage(mozwebqa)
        dashboardpage_obj = DashboardPage(mozwebqa)
        addonpage_obj = AddonEditorPage(mozwebqa)

        homepage_obj.go_to_home_page()
        homepage_obj.header.click_signin()
        loginpage_obj.login()
        Assert.true(dashboardpage_obj.is_the_current_page)

        # Go back to homepage and create a new addon to work with.
        dashboardpage_obj.header.click_home_logo()
        homepage_obj.click_create_addon_btn()
        addon_name = addonpage_obj.addon_name
        addonpage_obj.header.click_dashboard()

        #Click on the private button to make it private and then check that the addon is not in the list anymore
        dashboardpage_obj.addon(addon_name).click_private()
        Assert.false(dashboardpage_obj.addon(addon_name).is_displayed, "Addon %s found" % addon_name)

        #Go to the private addons page and check that the addon that you just made private is present there.
        #Click on public to make it public and check on the dashboard that the addon is present there.
        dashboardpage_obj.click_private_addons_link()
        Assert.true(dashboardpage_obj.addon(addon_name).is_displayed, "Addon %s not found" % addon_name)

        # Switch it back to public now, addon should disappear
        dashboardpage_obj.addon(addon_name).click_public()
        Assert.false(dashboardpage_obj.addon(addon_name).is_displayed, "Addon %s found" % addon_name)

        # Should be on main dashboard page
        dashboardpage_obj.header.click_dashboard()
        Assert.true(dashboardpage_obj.addon(addon_name).is_displayed, "Addon %s not found" % addon_name)

        dashboardpage_obj.delete_test_data()
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:37,代码来源:test_addon_lib_activate.py

示例4: test_create_addon

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_create_addon(self, mozwebqa):
        #This test is to check the labels of an add-on on the dashboard
        #Create page objects
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()
        loginpage_obj = homepage_obj.header.click_signin()
        dashboard_obj = loginpage_obj.login()

        #Create an addon. Then go to dashboard and assert that the label is 'initial'.
        homepage_obj = dashboard_obj.go_to_home_page()
        addonpage_obj = homepage_obj.click_create_addon_btn()
        addon_name = addonpage_obj.package_name

        dashboard_obj = addonpage_obj.header.click_dashboard()
        Assert.true(dashboard_obj.is_the_current_page)
        Assert.true(dashboard_obj.addon(addon_name).is_displayed, "Addon %s not found" % addon_name)

        #Click on the edit button of the addon.Then create a copy of that addon and assert that the label is 'copy'
        addonpage_obj = dashboard_obj.addon(addon_name).click_edit()
        addonpage_obj.click_copy()
        copy_addon_name = addonpage_obj.package_name

        Assert.contains(addon_name, copy_addon_name)
        Assert.contains('copy', copy_addon_name)

        dashboard_obj = homepage_obj.header.click_dashboard()
        Assert.true(dashboard_obj.addon(copy_addon_name).is_displayed, "Addon %s not found" % copy_addon_name)

        dashboard_obj.delete_test_data()
开发者ID:bebef1987,项目名称:FlightDeck-selenium,代码行数:32,代码来源:test_addon_create.py

示例5: test_create_library

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_create_library(self, mozwebqa):
        #This test is to check the labels of a library on the dashboard
        #Create page objects
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()
        loginpage_obj = homepage_obj.header.click_signin()
        dashboard_obj = loginpage_obj.login()

        #Create a library. Then go to dashboard and assert that the label is present.
        homepage_obj = dashboard_obj.go_to_home_page()
        libpage_obj = homepage_obj.click_create_lib_btn()
        library_name = libpage_obj.package_name

        dashboard_obj = libpage_obj.header.click_dashboard()
        Assert.true(dashboard_obj.is_the_current_page)
        Assert.true(dashboard_obj.library(library_name).is_displayed, "Library %s not found" % library_name)

        #Click on the edit button of the library.Then create a copy of that library and assert that the label is 'copy'
        libpage_obj = dashboard_obj.library(library_name).click_edit()
        libpage_obj.click_copy()
        copy_library_name = libpage_obj.package_name

        Assert.contains(library_name, copy_library_name)
        Assert.contains('copy', copy_library_name)

        dashboard_obj = libpage_obj.header.click_dashboard()
        Assert.true(dashboard_obj.library(copy_library_name).is_displayed, "Library %s not found" % copy_library_name)

        dashboard_obj.delete_test_data()
开发者ID:AlexLakatos,项目名称:FlightDeck-selenium,代码行数:32,代码来源:test_library_create.py

示例6: testShouldCheckLibraryLabel

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def testShouldCheckLibraryLabel(self, mozwebqa):
        #This test is to check the labels of a library on the dashboard
        #Create page objects
        homepage_obj = HomePage(mozwebqa)
        loginpage_obj = LoginPage(mozwebqa)
        dashboardpage_obj = DashboardPage(mozwebqa)
        libpage_obj = LibraryEditorPage(mozwebqa)

        loginpage_obj.login()

        #Create a library. Then go to dashboard and assert that the label is present.
        homepage_obj.go_to_home_page()
        homepage_obj.click_create_lib_btn()
        library_name = libpage_obj.library_name

        libpage_obj.header.click_dashboard()
        Assert.true(dashboardpage_obj.is_the_current_page)
        Assert.true(dashboardpage_obj.library(library_name).is_displayed, "Library %s not found" % library_name)

        #Click on the edit button of the library.Then create a copy of that library and assert that the label is 'copy'
        dashboardpage_obj.library(library_name).click_edit()
        libpage_obj.click_copy()
        copy_library_name = libpage_obj.library_name

        try:
            Assert.not_equal(library_name, copy_library_name)
        except:
            print 'A copy of the library could not be created'
        libpage_obj.header.click_dashboard()

        Assert.true(dashboardpage_obj.library(copy_library_name).is_displayed, "Library %s not found" % copy_library_name)
        
        dashboardpage_obj.delete_test_data()
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:35,代码来源:test_lib_label.py

示例7: test_search_by_library_name_returns_library

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_search_by_library_name_returns_library(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)
        loginpage_obj = LoginPage(mozwebqa)
        dashboard_obj = DashboardPage(mozwebqa)
        librarypage_obj = LibraryEditorPage(mozwebqa)
        searchpage_obj = SearchPage(mozwebqa)

        homepage_obj.go_to_home_page()
        homepage_obj.header.click_signin()
        loginpage_obj.login()

        #create a new library with the valid criteria (version not initial)
        dashboard_obj.header.click_home_logo()
        homepage_obj.click_create_lib_btn()
        librarypage_obj.type_library_version('searchable')
        librarypage_obj.click_save()
        searchterm = librarypage_obj.library_name

        librarypage_obj.header.click_home_logo()
        homepage_obj.header.click_search()

        searchpage_obj.search_until_package_exists(searchterm, searchpage_obj.library(searchterm))
        Assert.true(searchpage_obj.library(searchterm).is_displayed, '%s not found before timeout' % searchterm)

        searchpage_obj.delete_test_data()
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:27,代码来源:test_search.py

示例8: test_doc_link_redirects

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_doc_link_redirects(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()
        link = homepage_obj.header.documentation_link
        homepage_obj.selenium.get(link)

        Assert.contains("https://addons.mozilla.org/en-US/developers/docs/sdk/latest/", homepage_obj.selenium.current_url)
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:10,代码来源:test_homepage.py

示例9: test_addons_libraries_listed_on_home

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_addons_libraries_listed_on_home(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()

        #3 of each should be present
        Assert.equal(homepage_obj.browse_addons_count, 3)
        Assert.equal(homepage_obj.browse_libraries_count, 3)
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:10,代码来源:test_homepage.py

示例10: test_login

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_login(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()
        loginpage_obj = homepage_obj.header.click_signin()
        Assert.true(loginpage_obj.is_the_current_page)
        dashboard_obj = loginpage_obj.login()

        Assert.true(dashboard_obj.is_the_current_page)
        Assert.true(dashboard_obj.header.logged_in)
        Assert.equal(dashboard_obj.logged_in_username, mozwebqa.credentials['default']['name'])
开发者ID:AlexIssayev,项目名称:FlightDeck-selenium,代码行数:13,代码来源:test_login_logout.py

示例11: test_view_source_library

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_view_source_library(self, mozwebqa):
        #This test is to check viewing the source of a library while not logged in
        homepage_obj = HomePage(mozwebqa)

        #Go to search page and click view source on the first library listed
        homepage_obj.go_to_home_page()
        searchpage_obj = homepage_obj.header.click_search()
        libraryeditor_obj = searchpage_obj.library(1).click()

        Assert.true(libraryeditor_obj.tab(1).selected)
        Assert.not_none(libraryeditor_obj.tab(1).content)
开发者ID:AlexIssayev,项目名称:FlightDeck-selenium,代码行数:13,代码来源:test_view_source.py

示例12: test_view_source_addon

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_view_source_addon(self, mozwebqa):
        #This test is to check viewing the source of an addon while not logged in
        homepage_obj = HomePage(mozwebqa)

        #Go to search page and click view source on the first addon listed
        homepage_obj.go_to_home_page()
        searchpage_obj = homepage_obj.header.click_search()
        addoneditor_obj = searchpage_obj.addon(1).click()  # TODO:  wtf

        Assert.true(addoneditor_obj.tab(1).selected)
        Assert.not_none(addoneditor_obj.tab(1).content)
开发者ID:AlexIssayev,项目名称:FlightDeck-selenium,代码行数:13,代码来源:test_view_source.py

示例13: test_used_packages_slider_filters_results

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_used_packages_slider_filters_results(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()
        searchpage_obj = homepage_obj.header.click_search()
        searchpage_obj.click_filter_libraries_link()

        initial_library_count = searchpage_obj.library_count_label
        searchpage_obj.move_used_packages_slider(10)

        Assert.true(initial_library_count > searchpage_obj.library_count_label)
开发者ID:bebef1987,项目名称:FlightDeck-selenium,代码行数:13,代码来源:test_search.py

示例14: test_activity_slider_filters_results

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_activity_slider_filters_results(self, mozwebqa):
        homepage_obj = HomePage(mozwebqa)

        homepage_obj.go_to_home_page()
        searchpage_obj = homepage_obj.header.click_search()

        initial_addon_count = searchpage_obj.addons_count_label
        initial_library_count = searchpage_obj.library_count_label
        searchpage_obj.move_activity_slider(1)

        Assert.true(initial_addon_count > searchpage_obj.addons_count_label)
        Assert.true(initial_library_count > searchpage_obj.library_count_label)
开发者ID:bebef1987,项目名称:FlightDeck-selenium,代码行数:14,代码来源:test_search.py

示例15: test_clicking_library_author_link_displays_author_profile

# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import go_to_home_page [as 别名]
    def test_clicking_library_author_link_displays_author_profile(self, mozwebqa):

        # go to library result and click author link
        homepage_obj = HomePage(mozwebqa)
        userpage_obj = UserPage(mozwebqa)

        homepage_obj.go_to_home_page()
        searchpage_obj = homepage_obj.header.click_search()

        library_name = searchpage_obj.library(1).name
        author_name = searchpage_obj.library(library_name).author_name
        searchpage_obj.library(library_name).click_author()
        Assert.equal(userpage_obj.author_name.lower(), author_name)
开发者ID:bebef1987,项目名称:FlightDeck-selenium,代码行数:15,代码来源:test_search.py


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