9 use Magento\Mtf\ObjectManagerInterface;
10 use Symfony\Component\Console\Input\InputInterface;
11 use Symfony\Component\Console\Output\OutputInterface;
12 use Magento\Mtf\Client\Driver\Selenium\Driver;
24 private $objectManager;
29 public function __construct(ObjectManagerInterface $objectManager)
31 parent::__construct();
43 $this->setName(
'troubleshooting:check-selenium-session-connection')
44 ->setDescription(
'Check that Selenium session connection is established.');
57 $output = $this->objectManager->create(
61 $output->writeln(
"Verifying selenium server session...");
63 $driver = $this->objectManager->create(Driver::class);
64 $driver->closeWindow();
65 }
catch (\Exception $e) {
66 $output->outputMessages([
'error' =>
68 'The Selenium Server session cannot be established. Check if:' 69 . PHP_EOL .
"\tSelenium server is launched." 70 . PHP_EOL .
"\tSelenium server host and port configuration are correct in etc/config.xml." 71 . PHP_EOL .
"\tThere is a valid browser name in etc/config.xml." 72 . PHP_EOL .
"\tSelenium server is run with appropriate driver." 73 . PHP_EOL .
"\tSelenium server version is compatible with web browser version." 77 $output->writeln(
'Verification of selenium server session is finished.');
__construct(ObjectManagerInterface $objectManager)
execute(InputInterface $input, OutputInterface $output)