def setUp(self): super(SeleniumTestCase, self).setUp() paths = [local_paths_config()] self.engine.configure(paths) # FIXME: avoid using whole engine in particular module test! self.virtual_display = VirtualDisplay() self.virtual_display.engine = self.engine self.virtual_display.startup() self.obj.settings = self.engine.config.get("modules").get("selenium")
def setUp(self): super(SeleniumTestCase, self).setUp() self.tmp_selenium = bzt.modules._selenium.Selenium self.tmp_selenium_apiritif = bzt.modules._apiritif.executor.Selenium bzt.modules._selenium.Selenium = MockPythonTool bzt.modules._apiritif.executor.Selenium = MockPythonTool paths = [local_paths_config()] self.engine.configure(paths) # FIXME: avoid using whole engine in particular module test! self.virtual_display = VirtualDisplay() self.virtual_display.engine = self.engine self.virtual_display.startup() self.obj.settings = self.engine.config.get("modules").get("selenium")
def prepare(self): if self.get_load().concurrency and self.get_load().concurrency > 1: msg = 'Selenium supports concurrency in cloud provisioning mode only\n' msg += 'For details look at http://gettaurus.org/docs/Cloud.md' self.log.warning(msg) # backwards-compatible virtual-display settings vd_conf = self.settings.get("virtual-display") if vd_conf: self.log.warning("Configuring virtual-display in Selenium module settings is deprecated." " Use the service approach instead") service_conf = copy.deepcopy(vd_conf) service_conf["module"] = "virtual-display" self.virtual_display_service = VirtualDisplay() self.virtual_display_service.parameters.merge(service_conf) self.virtual_display_service.prepare() self.create_runner() self.runner.prepare() self.script = self.runner.script