How to use the toolium.driver_wrappers_pool.DriverWrappersPool.get_default_wrapper function in toolium

To help you get started, we’ve selected a few toolium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Telefonica / toolium / toolium / test_cases.py View on Github external
def setUp(self):
        self.driver_wrapper = DriverWrappersPool.get_default_wrapper()
        if not self.driver_wrapper.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
github Telefonica / toolium / toolium / test_cases.py View on Github external
def setUp(self):
        # Configure logger and properties
        if not isinstance(self, SeleniumTestCase):
            # 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())

            self.driver_wrapper = DriverWrappersPool.get_default_wrapper()
            self.config_files = DriverWrappersPool.initialize_config_files(self.config_files)
            self.driver_wrapper.configure(self.config_files, is_selenium_test=False)
        # Get config and logger instances
        self.config = self.driver_wrapper.config
        self.logger = logging.getLogger(__name__)
        self.logger.info("Running new test: %s", self.get_subclassmethod_name())
github Telefonica / toolium / toolium / utils / driver_utils.py View on Github external
def __init__(self, driver_wrapper=None):
        """Initialize Utils instance

        :param driver_wrapper: driver wrapper instance
        """
        from toolium.driver_wrappers_pool import DriverWrappersPool
        self.driver_wrapper = driver_wrapper if driver_wrapper else DriverWrappersPool.get_default_wrapper()
        # Configure logger
        self.logger = logging.getLogger(__name__)
github Telefonica / toolium / toolium / jira.py View on Github external
def save_jira_conf():
    """Read Jira configuration from properties file and save it"""
    global enabled, execution_url, summary_prefix, labels, comments, fix_version, build, only_if_changes, attachments
    config = DriverWrappersPool.get_default_wrapper().config
    enabled = config.getboolean_optional('Jira', 'enabled')
    execution_url = config.get_optional('Jira', 'execution_url')
    summary_prefix = config.get_optional('Jira', 'summary_prefix')
    labels = config.get_optional('Jira', 'labels')
    comments = config.get_optional('Jira', 'comments')
    fix_version = config.get_optional('Jira', 'fixversion')
    build = config.get_optional('Jira', 'build')
    only_if_changes = config.getboolean_optional('Jira', 'onlyifchanges')
    attachments = []
github Telefonica / toolium / toolium / driver_wrapper.py View on Github external
def __init__(self):
        if not DriverWrappersPool.is_empty():
            # Copy config object and other properties from default driver
            default_wrapper = DriverWrappersPool.get_default_wrapper()
            self.config = default_wrapper.config.deepcopy()
            self.logger = default_wrapper.logger
            self.config_properties_filenames = default_wrapper.config_properties_filenames
            self.config_log_filename = default_wrapper.config_log_filename
            self.output_log_filename = default_wrapper.output_log_filename
            self.visual_baseline_directory = default_wrapper.visual_baseline_directory
            self.baseline_name = default_wrapper.baseline_name

        # Create utils instance and add wrapper to the pool
        self.utils = Utils(self)
        DriverWrappersPool.add_wrapper(self)