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();
     }
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (Selenium::startedInCWD()) {
         Selenium::stop(false);
         Selenium::start();
     } elseif ($data = Selenium::startedInHigherDirectory()) {
         $helper = $this->getHelper('question');
         $question = new ConfirmationQuestion('Selenium was started in a higher directory, do you really want to restart it? (y/N) ', false);
         if ($helper->ask($input, $output, $question)) {
             Selenium::stop(true);
             Selenium::start($data['pidDirectory']);
         }
     } else {
         $output->writeln("<comment>Selenium doesn't seem to be running.</comment>");
     }
 }