def configure(self, options, config): if options.selenium_ss_dir: self.ss_dir = os.path.abspath(options.selenium_ss_dir) else: self.ss_dir = os.path.abspath('failure_screenshots') valid_browsers = ['firefox', 'internet_explorer', 'chrome'] if options.driver_type not in valid_browsers: raise RuntimeError('--driver-type must be one of: %s' % ' '.join(valid_browsers)) self._driver_type = options.driver_type.replace('_', ' ') self._remote_server_address = options.remote_server_address self._selenium_port = options.selenium_port self._driver = None self._current_windows_handle = None self.x_display = 1 self.run_headless = False if options.headless: self.run_headless = True self.x_display = int(options.headless) if options.track_stats and options.track_stats not in ('trips', 'runtime'): raise RuntimeError('--track-stats must be "trips" or "runtime"') self._track_stats = options.track_stats Plugin.configure(self, options, config)
def configure(self, options, config): if options.selenium_ss_dir: self.ss_dir = os.path.abspath(options.selenium_ss_dir) else: self.ss_dir = os.path.abspath('failure_screenshots') valid_browsers = ['firefox', 'internet_explorer', 'chrome'] if options.driver_type not in valid_browsers: raise RuntimeError( '--driver-type must be one of: %s' % ' '.join(valid_browsers) ) self._firefox_binary = options.firefox_binary self._driver_type = options.driver_type.replace('_', ' ') self._remote_server_address = options.remote_server_address self._selenium_port = options.selenium_port self._driver = None self._current_windows_handle = None self.x_display = 1 self.run_headless = False if options.headless: self.run_headless = True self.x_display = int(options.headless) if options.track_stats and options.track_stats not in ('trips', 'runtime'): # noqa raise RuntimeError('--track-stats must be "trips" or "runtime"') self._track_stats = options.track_stats Plugin.configure(self, options, config)
def configure(self, options, config): # This is only checked since this plugin is configured regardless if # the sshtunnel flag is used, and we only want this info here if the # --remote-server flag is used if options.remote_server: try: to_port, from_port = options.to_from_ports.split(':', 1) except: raise RuntimeError("--to_from_ports should be of the form x:y") else: self._to_port = to_port self._from_port = from_port self._remote_server = options.remote_server self._username = options.username Plugin.configure(self, options, config)
def configure(self, options, config): # This is only checked since this plugin is configured regardless if # the sshtunnel flag is used, and we only want this info here if the # --remote-server flag is used if options.remote_server: try: to_port, from_port = options.to_from_ports.split(':', 1) except: raise RuntimeError("--to_from_ports should be of the form x:y") else: self._to_port = to_port self._from_port = from_port self._remote_server = options.remote_server self._username = options.username Plugin.configure(self, options, config)
def configure(self, options, config): Plugin.configure(self, options, config)