本文整理汇总了Python中toolium.driver_wrappers_pool.DriverWrappersPool.get_default_config_directory方法的典型用法代码示例。如果您正苦于以下问题:Python DriverWrappersPool.get_default_config_directory方法的具体用法?Python DriverWrappersPool.get_default_config_directory怎么用?Python DriverWrappersPool.get_default_config_directory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toolium.driver_wrappers_pool.DriverWrappersPool
的用法示例。
在下文中一共展示了DriverWrappersPool.get_default_config_directory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import get_default_config_directory [as 别名]
def setUp(self):
if not SeleniumTestCase.driver and not self.config_files.config_directory:
# By default config directory is located in test path
self.config_files.set_config_directory(DriverWrappersPool.get_default_config_directory())
super(AppiumTestCase, self).setUp()
AppiumTestCase.app_strings = self.driver_wrapper.app_strings
示例2: setUp
# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import get_default_config_directory [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()
示例3: setUp
# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import get_default_config_directory [as 别名]
def setUp(self):
# Get default driver wrapper
self.driver_wrapper = DriverWrappersPool.get_default_wrapper()
if not SeleniumTestCase.driver:
# 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())
# Create driver
self.driver_wrapper.configure(True, self.config_files)
self.driver_wrapper.connect()
SeleniumTestCase.driver = self.driver_wrapper.driver
self.utils = self.driver_wrapper.utils
# Get common configuration of reusing driver
self.reuse_driver = self.driver_wrapper.config.getboolean_optional('Driver', 'reuse_driver')
# Set implicitly wait
self.utils.set_implicit_wait()
# Call BasicTestCase setUp
super(SeleniumTestCase, self).setUp()