protected function execute(InputInterface $input, OutputInterface $output) { if (Selenium::startedInCWD()) { Selenium::stop(false); } elseif (Selenium::startedInHigherDirectory()) { $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('Selenium was started in a higher directory, do you really want to stop it? (y/N) ', false); if ($helper->ask($input, $output, $question)) { Selenium::stop(true); } } else { $output->writeln("<comment>Selenium doesn't seem to be running.</comment>"); } }
protected function execute(InputInterface $input, OutputInterface $output) { if (Selenium::startedInCWD()) { $output->writeln("<comment>Selenium seems to be already running!</comment>"); } elseif (Selenium::startedInHigherDirectory()) { $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('Selenium was started in a higher directory, do you want to spawn another instance here? (y/N) ', false); if ($helper->ask($input, $output, $question)) { Selenium::start(); } } else { Selenium::start(); } }