本文整理汇总了Python中toolium.driver_wrappers_pool.DriverWrappersPool.connect_default_driver_wrapper方法的典型用法代码示例。如果您正苦于以下问题:Python DriverWrappersPool.connect_default_driver_wrapper方法的具体用法?Python DriverWrappersPool.connect_default_driver_wrapper怎么用?Python DriverWrappersPool.connect_default_driver_wrapper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toolium.driver_wrappers_pool.DriverWrappersPool
的用法示例。
在下文中一共展示了DriverWrappersPool.connect_default_driver_wrapper方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import connect_default_driver_wrapper [as 别名]
def setUp(self):
# By default config directory is located in test path
if not self.config_files.config_directory:
self.config_files.set_config_directory(DriverWrappersPool.get_default_config_directory())
# Get default driver wrapper and connect it
self.driver_wrapper = DriverWrappersPool.connect_default_driver_wrapper(config_files=self.config_files)
SeleniumTestCase.driver = self.driver_wrapper.driver
self.utils = self.driver_wrapper.utils
# Monkey patching assert_screenshot method in PageElement to use the correct test name
file_suffix = self.get_method_name()
def assert_screenshot_page_element(self, filename, threshold=0, exclude_elements=[], force=False):
VisualTest(self.driver_wrapper, force).assert_screenshot(self.web_element, filename, file_suffix,
threshold, exclude_elements)
PageElement.assert_screenshot = assert_screenshot_page_element
# Call BasicTestCase setUp
super(SeleniumTestCase, self).setUp()