本文整理汇总了Python中pages.home_page.HomePage.click_create_addon_btn方法的典型用法代码示例。如果您正苦于以下问题:Python HomePage.click_create_addon_btn方法的具体用法?Python HomePage.click_create_addon_btn怎么用?Python HomePage.click_create_addon_btn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home_page.HomePage
的用法示例。
在下文中一共展示了HomePage.click_create_addon_btn方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_search_by_addon_name_returns_addon
# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import click_create_addon_btn [as 别名]
def test_search_by_addon_name_returns_addon(self, mozwebqa):
homepage_obj = HomePage(mozwebqa)
loginpage_obj = LoginPage(mozwebqa)
dashboard_obj = DashboardPage(mozwebqa)
addonpage_obj = AddonEditorPage(mozwebqa)
searchpage_obj = SearchPage(mozwebqa)
homepage_obj.go_to_home_page()
homepage_obj.header.click_signin()
loginpage_obj.login()
#create a new addon with the valid criteria (version not initial)
dashboard_obj.header.click_home_logo()
homepage_obj.click_create_addon_btn()
addonpage_obj.type_addon_version('searchable')
addonpage_obj.click_save()
searchterm = addonpage_obj.addon_name
addonpage_obj.header.click_home_logo()
homepage_obj.header.click_search()
searchpage_obj.search_until_package_exists(searchterm, searchpage_obj.addon(searchterm))
Assert.true(searchpage_obj.addon(searchterm).is_displayed, '%s not found before timeout' % searchterm)
searchpage_obj.delete_test_data()
示例2: testShouldCheckAddonLabel
# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import click_create_addon_btn [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()
示例3: testShouldCheckAddonDeactivateAndActivate
# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import click_create_addon_btn [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()
示例4: test_create_addon
# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import click_create_addon_btn [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()
示例5: testShouldCheckAddonDelete
# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import click_create_addon_btn [as 别名]
def testShouldCheckAddonDelete(self, mozwebqa):
homepage_obj = HomePage(mozwebqa)
loginpage_obj = LoginPage(mozwebqa)
dashboardpage_obj = DashboardPage(mozwebqa)
addonpage_obj = AddonEditorPage(mozwebqa)
loginpage_obj.login()
homepage_obj.go_to_home_page()
homepage_obj.click_create_addon_btn()
# Get the name of the addon on the editor page.
addon_name = addonpage_obj.addon_name
# Go the the dashboard and delete the addon that you just created. Then check that the addon at the top of the list is not the same as the one you just deleted.
homepage_obj.header.click_dashboard()
dashboardpage_obj.addon(addon_name).click_delete()
dashboardpage_obj.addon(addon_name).confirm_delete()
Assert.false(dashboardpage_obj.addon(addon_name).is_displayed, "Addon %s found" % addon_name)
示例6: test_rename_addon
# 需要导入模块: from pages.home_page import HomePage [as 别名]
# 或者: from pages.home_page.HomePage import click_create_addon_btn [as 别名]
def test_rename_addon(self, mozwebqa):
homepage_obj = HomePage(mozwebqa)
homepage_obj.go_to_home_page()
loginpage_obj = homepage_obj.header.click_signin()
dashboard_obj = loginpage_obj.login()
new_addon_name = 'renamed addon ' + str(randint(1, 1000))
#Create an addon.
homepage_obj = dashboard_obj.go_to_home_page()
addonpage_obj = homepage_obj.click_create_addon_btn()
#Click properties and change its name
addonpage_obj.click_properties()
addonpage_obj.type_package_name(new_addon_name)
addonpage_obj.click_properties_save()
Assert.equal(addonpage_obj.package_name, new_addon_name)
addonpage_obj.delete_test_data()