本文整理汇总了Python中toolium.driver_wrappers_pool.DriverWrappersPool.close_drivers_and_download_videos方法的典型用法代码示例。如果您正苦于以下问题:Python DriverWrappersPool.close_drivers_and_download_videos方法的具体用法?Python DriverWrappersPool.close_drivers_and_download_videos怎么用?Python DriverWrappersPool.close_drivers_and_download_videos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toolium.driver_wrappers_pool.DriverWrappersPool
的用法示例。
在下文中一共展示了DriverWrappersPool.close_drivers_and_download_videos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDownClass
# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import close_drivers_and_download_videos [as 别名]
def tearDownClass(cls):
# Call BasicTestCase tearDownClass
super(SeleniumTestCase, cls).tearDownClass()
# Close browser and stop driver if it has been reused
DriverWrappersPool.close_drivers_and_download_videos(cls.get_subclass_name())
SeleniumTestCase.driver = None
示例2: tearDown
# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import close_drivers_and_download_videos [as 别名]
def tearDown(self):
# Call BasicTestCase tearDown
super(SeleniumTestCase, self).tearDown()
test_name = self.get_subclassmethod_name().replace('.', '_')
# Capture screenshot and save logs on error
if not self._test_passed:
DriverWrappersPool.capture_screenshots(test_name)
DriverWrappersPool.save_all_webdriver_logs(self.get_subclassmethod_name())
# Close browser and stop driver if it must not be reused
DriverWrappersPool.close_drivers_and_download_videos(test_name, self._test_passed, self.reuse_driver)
if not self.reuse_driver:
SeleniumTestCase.driver = None