Beispiel #1
0
    def start(self, url=None, image=None, maximize=True):
        if url is not None:
            self.url = url
        if not OSHelper.is_windows():
            self.runner = self.launch()
            self.runner.start()
        else:
            try:
                logger.debug("Starting Firefox with custom command.")
                FXRunner.process = subprocess.Popen(
                    [
                        self.application.path,
                        "-no-remote",
                        "-new-tab",
                        self.url,
                        "--wait-for-browser",
                        "-foreground",
                        "-profile",
                        self.profile.profile,
                    ],
                    shell=False,
                )

            except subprocess.CalledProcessError:
                logger.error("Firefox failed to start")
                exit(1)
        confirm_firefox_launch(image)
        if maximize:
            maximize_window()
Beispiel #2
0
    def start(self, image=None, maximize=True):
        if not OSHelper.is_windows():
            self.runner.start()
        else:
            try:
                logger.debug('Starting Firefox with custom command.')
                FXRunner.process = subprocess.Popen([
                    self.application.path, '-no-remote', '-new-tab', self.url,
                    '--wait-for-browser', '-foreground', '-profile',
                    self.profile.profile
                ],
                                                    shell=False)

            except subprocess.CalledProcessError:
                logger.error('Firefox failed to start')
                exit(1)
        confirm_firefox_launch(image)
        if maximize:
            maximize_window()