本文整理汇总了Python中firefox_puppeteer.testcases.FirefoxTestCase.tearDown方法的典型用法代码示例。如果您正苦于以下问题:Python FirefoxTestCase.tearDown方法的具体用法?Python FirefoxTestCase.tearDown怎么用?Python FirefoxTestCase.tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类firefox_puppeteer.testcases.FirefoxTestCase
的用法示例。
在下文中一共展示了FirefoxTestCase.tearDown方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.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_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.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_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.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)
示例4: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.browser.tabbar.close_all_tabs([self.browser.tabbar.selected_tab])
# Print results for now until we have treeherder integration
output = pprint.pformat(self.updates)
self.logger.info('Update test results: \n{}'.format(output))
finally:
FirefoxTestCase.tearDown(self)
self.restore_config_files()
示例5: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.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)
示例6: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
self.autocomplete_results.close(force=True)
FirefoxTestCase.tearDown(self)
示例7: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
finally:
FirefoxTestCase.tearDown(self)
示例8: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.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_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
FirefoxTestCase.tearDown(self)
示例10: tearDown
# 需要导入模块: from firefox_puppeteer.testcases import FirefoxTestCase [as 别名]
# 或者: from firefox_puppeteer.testcases.FirefoxTestCase import tearDown [as 别名]
def tearDown(self):
try:
self.windows.close_all([self.browser])
finally:
FirefoxTestCase.tearDown(self)