本文整理汇总了Python中firefox_ui_harness.testcases.FirefoxTestCase.tearDown方法的典型用法代码示例。如果您正苦于以下问题:Python FirefoxTestCase.tearDown方法的具体用法?Python FirefoxTestCase.tearDown怎么用?Python FirefoxTestCase.tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类firefox_ui_harness.testcases.FirefoxTestCase
的用法示例。
在下文中一共展示了FirefoxTestCase.tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.autocomplete_results.close(force=True)
self.marionette.clear_pref(self.PREF_SUGGEST_SEARCHES)
self.marionette.clear_pref(self.PREF_SUGGEST_BOOKMARK)
finally:
FirefoxTestCase.tearDown(self)
示例2: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.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.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self, *args, **kwargs):
try:
self._check_and_fix_leaked_rules()
self._check_and_fix_leaked_rules_in_rules_file()
self._check_and_fix_ignoring_errors()
self._check_gecko_log()
finally:
FirefoxTestCase.tearDown(self, *args, **kwargs)
示例4: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.utils.permissions.remove('https://www.itisatrap.org', 'safe-browsing')
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
self.marionette.clear_pref('browser.safebrowsing.malware.enabled')
self.marionette.clear_pref('browser.safebrowsing.phishing.enabled')
finally:
FirefoxTestCase.tearDown(self)
示例5: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.utils.permissions.remove(self.addons_url, "install")
if self.browser.notification:
self.browser.notification.close(force=True)
finally:
FirefoxTestCase.tearDown(self)
示例6: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.marionette.clear_pref('marionette.unittest.set_pref')
self.marionette.clear_pref('marionette.unittest.unknown')
self.marionette.clear_pref('browser.tabs.loadBookmarksInBackground')
self.marionette.clear_pref('browser.tabs.maxOpenBeforeWarn')
self.marionette.clear_pref('browser.startup.homepage')
finally:
FirefoxTestCase.tearDown(self)
示例7: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.autocomplete_results.close(force=True)
except NoSuchElementException:
# TODO: A NoSuchElementException is thrown here when tests accessing the
# autocomplete_results element are skipped.
pass
finally:
FirefoxTestCase.tearDown(self)
示例8: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.windows.close_all([self.browser])
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
self.browser.switch_to()
self.identity_popup.close(force=True)
self.marionette.clear_pref("browser.startup.page")
finally:
FirefoxTestCase.tearDown(self)
示例9: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.marionette.clear_pref("extensions.install.requireSecureOrigin")
self.marionette.clear_pref("xpinstall.signatures.required")
self.utils.permissions.remove(self.addons_url, "install")
if self.browser.notification:
self.browser.notification.close(force=True)
finally:
FirefoxTestCase.tearDown(self)
示例10: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
# Close the autocomplete results
try:
if self.bookmark_panel:
self.marionette.execute_script("""
arguments[0].hidePopup();
""", script_args=[self.bookmark_panel])
self.browser.navbar.locationbar.autocomplete_results.close()
self.places.restore_default_bookmarks()
finally:
FirefoxTestCase.tearDown(self)
示例11: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.software_update.update_channel.default_channel = self.saved_channel
finally:
FirefoxTestCase.tearDown(self)
示例12: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
FirefoxTestCase.tearDown(self)
示例13: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
# Restart with a fresh profile
self.restart(clean=True)
finally:
FirefoxTestCase.tearDown(self)
示例14: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.marionette.clear_pref('app.support.baseURL')
finally:
FirefoxTestCase.tearDown(self)
示例15: tearDown
# 需要导入模块: from firefox_ui_harness.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_ui_harness.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
finally:
FirefoxTestCase.tearDown(self)