本文整理匯總了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)