当前位置: 首页>>代码示例>>Python>>正文


Python DriverWrappersPool._empty_pool方法代码示例

本文整理汇总了Python中toolium.driver_wrappers_pool.DriverWrappersPool._empty_pool方法的典型用法代码示例。如果您正苦于以下问题:Python DriverWrappersPool._empty_pool方法的具体用法?Python DriverWrappersPool._empty_pool怎么用?Python DriverWrappersPool._empty_pool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toolium.driver_wrappers_pool.DriverWrappersPool的用法示例。


在下文中一共展示了DriverWrappersPool._empty_pool方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: driver_wrapper

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
def driver_wrapper():
    # Reset wrappers pool values
    DriverWrappersPool._empty_pool()
    DriverWrapper.config_properties_filenames = None

    # Create a new wrapper
    driver_wrapper = DriverWrappersPool.get_default_wrapper()
    driver_wrapper.driver = mock.MagicMock()

    return driver_wrapper
开发者ID:Telefonica,项目名称:toolium,代码行数:12,代码来源:test_page_elements.py

示例2: setUp

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
    def setUp(self):
        """Create a new mock element and a new driver before each test"""
        global mock_element
        mock_element = mock.MagicMock(spec=WebElement)
        mock_element.find_element.return_value = child_element

        # Reset wrappers pool values
        DriverWrappersPool._empty_pool()
        DriverWrapper.config_properties_filenames = None

        # Create a new wrapper
        self.driver_wrapper = DriverWrappersPool.get_default_wrapper()
        self.driver_wrapper.driver = mock.MagicMock()
开发者ID:cesarca,项目名称:toolium,代码行数:15,代码来源:test_page_element.py

示例3: setUp

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
    def setUp(self):
        # Reset wrappers pool values
        DriverWrappersPool._empty_pool()

        # Create default wrapper
        self.driver_wrapper = DriverWrappersPool.get_default_wrapper()

        # Configure properties
        config_files = ConfigFiles()
        root_path = os.path.dirname(os.path.realpath(__file__))
        config_files.set_config_directory(os.path.join(root_path, 'conf'))
        config_files.set_output_directory(os.path.join(root_path, 'output'))
        self.driver_wrapper.configure(tc_config_files=config_files)
开发者ID:cesarca,项目名称:toolium,代码行数:15,代码来源:test_driver_wrappers_pool.py

示例4: setUp

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
    def setUp(self):
        # Reset wrappers pool values
        DriverWrappersPool._empty_pool()
        DriverWrapper.config_properties_filenames = None

        # Create a new wrapper
        self.driver_wrapper = DriverWrappersPool.get_default_wrapper()

        config_files = ConfigFiles()
        config_files.set_config_directory(os.path.join(self.root_path, 'conf'))
        config_files.set_output_directory(os.path.join(self.root_path, 'output'))
        DriverWrappersPool.configure_common_directories(config_files)
        self.driver_wrapper.configure_properties()
开发者ID:cesarca,项目名称:toolium,代码行数:15,代码来源:test_driver_wrapper.py

示例5: setUp

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
    def setUp(self):
        """Create a new mock element and a new driver before each test"""
        # Create a mock element
        self.mock_element = mock.MagicMock(spec=WebElement)
        self.mock_element.find_element.return_value = child_element
        self.mock_element.text = 'text value'
        self.mock_element.get_attribute.return_value = 'input text value'

        # Reset wrappers pool values
        DriverWrappersPool._empty_pool()
        DriverWrapper.config_properties_filenames = None

        # Create a new wrapper
        self.driver_wrapper = DriverWrappersPool.get_default_wrapper()
        self.driver_wrapper.driver = mock.MagicMock()
开发者ID:cesarca,项目名称:toolium,代码行数:17,代码来源:test_derived_page_element.py

示例6: driver_wrapper

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
def driver_wrapper():
    # Create a mock element
    global mock_element
    mock_element = mock.MagicMock(spec=WebElement)
    mock_element.find_element.return_value = child_element
    mock_element.text = 'text value'
    mock_element.get_attribute.return_value = 'input text value'

    # Reset wrappers pool values
    DriverWrappersPool._empty_pool()
    DriverWrapper.config_properties_filenames = None

    # Create a new wrapper
    driver_wrapper = DriverWrappersPool.get_default_wrapper()
    driver_wrapper.driver = mock.MagicMock()

    return driver_wrapper
开发者ID:jframos,项目名称:toolium,代码行数:19,代码来源:test_derived_page_element.py

示例7: driver_wrapper

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
def driver_wrapper():
    # Reset wrappers pool values
    DriverWrappersPool._empty_pool()
    DriverWrapper.config_properties_filenames = None

    # Create a new wrapper
    new_driver_wrapper = DriverWrappersPool.get_default_wrapper()

    # Configure wrapper
    config_files = ConfigFiles()
    root_path = os.path.dirname(os.path.realpath(__file__))
    config_files.set_config_directory(os.path.join(root_path, 'conf'))
    config_files.set_output_directory(os.path.join(root_path, 'output'))
    config_files.set_config_log_filename('logging.conf')
    new_driver_wrapper.configure(config_files)

    return new_driver_wrapper
开发者ID:jframos,项目名称:toolium,代码行数:19,代码来源:test_driver_wrapper.py

示例8: setUp

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
    def setUp(self):
        # Reset wrappers pool values
        DriverWrappersPool._empty_pool()
        DriverWrapper.config_properties_filenames = None

        # Create a new wrapper
        self.driver_wrapper = DriverWrappersPool.get_default_wrapper()
        self.driver_wrapper.driver = mock.MagicMock()

        # Configure properties
        self.root_path = os.path.dirname(os.path.realpath(__file__))
        config_files = ConfigFiles()
        config_files.set_config_directory(os.path.join(self.root_path, 'conf'))
        config_files.set_config_properties_filenames('properties.cfg')
        config_files.set_output_directory(os.path.join(self.root_path, 'output'))
        self.driver_wrapper.configure(tc_config_files=config_files)

        # Create a new Utils instance
        self.utils = Utils()
开发者ID:ivanprjcts,项目名称:toolium,代码行数:21,代码来源:test_utils.py

示例9: driver_wrapper

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
def driver_wrapper():
    # Reset wrappers pool values
    DriverWrappersPool._empty_pool()
    DriverWrapper.config_properties_filenames = None

    # Create a new wrapper
    driver_wrapper = DriverWrappersPool.get_default_wrapper()
    driver_wrapper.driver = mock.MagicMock()

    # Configure properties
    root_path = os.path.dirname(os.path.realpath(__file__))
    config_files = ConfigFiles()
    config_files.set_config_directory(os.path.join(root_path, 'conf'))
    config_files.set_config_properties_filenames('properties.cfg')
    config_files.set_output_directory(os.path.join(root_path, 'output'))
    driver_wrapper.configure(config_files)

    yield driver_wrapper

    # Reset wrappers pool values
    DriverWrappersPool._empty_pool()
    DriverWrapper.config_properties_filenames = None
开发者ID:jframos,项目名称:toolium,代码行数:24,代码来源:test_utils.py

示例10: driver_wrapper

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
def driver_wrapper():
    # Reset wrappers pool values
    DriverWrappersPool._empty_pool()
    DriverWrapper.config_properties_filenames = None

    # Create a new wrapper
    new_driver_wrapper = DriverWrappersPool.get_default_wrapper()

    # Configure wrapper
    config_files = ConfigFiles()
    root_path = os.path.dirname(os.path.realpath(__file__))
    config_files.set_config_directory(os.path.join(root_path, 'conf'))
    config_files.set_output_directory(os.path.join(root_path, 'output'))
    config_files.set_config_log_filename('logging.conf')
    DriverWrappersPool.configure_common_directories(config_files)
    new_driver_wrapper.configure_logger()

    yield new_driver_wrapper

    # Remove environment properties after test
    try:
        del os.environ["Config_prop_filenames"]
    except KeyError:
        pass
开发者ID:Telefonica,项目名称:toolium,代码行数:26,代码来源:test_driver_wrapper_properties.py

示例11: tearDownClass

# 需要导入模块: from toolium.driver_wrappers_pool import DriverWrappersPool [as 别名]
# 或者: from toolium.driver_wrappers_pool.DriverWrappersPool import _empty_pool [as 别名]
 def tearDownClass(cls):
     # Reset wrappers pool values
     DriverWrappersPool._empty_pool()
     DriverWrapper.config_properties_filenames = None
开发者ID:ivanprjcts,项目名称:toolium,代码行数:6,代码来源:test_utils.py


注:本文中的toolium.driver_wrappers_pool.DriverWrappersPool._empty_pool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。