本文整理汇总了Python中firefox_ui_harness.testcase.FirefoxTestCase.tearDown方法的典型用法代码示例。如果您正苦于以下问题:Python FirefoxTestCase.tearDown方法的具体用法?Python FirefoxTestCase.tearDown怎么用?Python FirefoxTestCase.tearDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类firefox_ui_harness.testcase.FirefoxTestCase
的用法示例。
在下文中一共展示了FirefoxTestCase.tearDown方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
# Close the autocomplete results
try:
self.browser.navbar.locationbar.autocomplete_results.close()
self.places.restore_default_bookmarks()
finally:
FirefoxTestCase.tearDown(self)
示例2: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.browser.switch_to()
self.identity_popup.close(force=True)
self.windows.close_all([self.browser])
finally:
FirefoxTestCase.tearDown(self)
示例3: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.identity_popup.close(force=True)
except NoSuchElementException:
# TODO: A NoSuchElementException may be thrown here when tests accessing the
# identity_popup.popup element are skipped.
pass
finally:
FirefoxTestCase.tearDown(self)
示例4: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.utils.remove_perms('www.itisatrap.org', 'safe-browsing')
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
finally:
FirefoxTestCase.tearDown(self)
示例5: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.places.restore_default_bookmarks()
self.places.remove_all_history()
finally:
FirefoxTestCase.tearDown(self)
示例6: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
FirefoxTestCase.tearDown(self)
示例7: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.windows.close_all([self.browser])
finally:
FirefoxTestCase.tearDown(self)
示例8: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.software_update.update_channel.default_channel = self.saved_channel
finally:
FirefoxTestCase.tearDown(self)
示例9: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
finally:
FirefoxTestCase.tearDown(self)
示例10: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.marionette.execute_script("arguments[0].hidePopup();",
script_args=[self.locationbar.notification_popup])
finally:
FirefoxTestCase.tearDown(self)
示例11: tearDown
# 需要导入模块: from firefox_ui_harness.testcase import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcase.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
self.prefs.restore_pref(homepage_pref)
FirefoxTestCase.tearDown(self)