public function stop()
 {
     $seleniumPort = $this->seleniumOptions->getSeleniumPort();
     $seleniumUrl = $this->seleniumOptions->getSeleniumUrl();
     $seleniumQuery = $this->seleniumOptions->getSeleniumQuery();
     $seleniumShutdownUrl = $this->seleniumOptions->getSeleniumShutdownUrl();
     $seleniumShutdownOptions = $this->seleniumOptions->getSeleniumShutDownOptions();
     if (!$seleniumShutdownOptions || !$seleniumShutdownUrl || !$seleniumPort || !$seleniumUrl || !$seleniumQuery) {
         throw new \LogicException('Port, Url, Shutdown Url, Shutdown Options, and Query are mandatory.');
     }
     $this->sendShutdownCmd($this->seleniumOptions->getSeleniumPort());
     $this->responseWaitter->waitUntilNotAvailable($seleniumUrl, $seleniumQuery);
 }
 public function isSeleniumAvailable()
 {
     return $this->responseWaitter->isAvailable($this->seleniumOptions->getSeleniumUrl(), $this->seleniumOptions->getSeleniumQuery());
 }