Start the Chromedriver process.

@return $this
503652
public function start(): DriverInterface
    {
        if (!$this->process) {
            $this->process = (new ChromeProcess($this->port))->toProcess();
            $this->process->start();
            sleep(1);
        }

        return $this;
    }
420714
public function focus()
    {
        $params = ['name' => $this->windowHandle];
        $command = $this->driver->factoryCommand('window', WebDriver_Command::METHOD_POST, $params);
        $this->driver->curl($command);
        return $this;
    }
504061
public function activate()
    {
        $this->isActive            = true;
        $this->attributes['class'] = Utils::addHtmlClass(
            array_get($this->attributes, 'class', ''),
            $this->activeClass
        );

        return $this;
    }
646106
public function start()
    {
        if (!$this->process->isStarted()) {
            $this->setStarted();
            $this->dispatch(RunEvent::STARTED, new RunEvent($this));
            $this->process->start(
                function ($type, $data) {
                    $this->lastType = $type;
                    foreach (explode("\n", $data) as $line) {
                        $line = rtrim($line);
                        if (mb_strlen($line) > 0) {
                            $this->last = $line;
                            if ($this->updateOnProcessOutput) {
                                $this->dispatch(RunEvent::UPDATED, new RunEvent($this));
                            }
                        }
                    }
                }
            );
            $this->completed = false;
        }

        return $this;
    }
1075866
public function run()
    {
        if ($this->initialized) {
            $this->console(sprintf("Start running '%s' method of script '%s'.", $this->opts->action, get_class($this)));
            $this->{$this->action}();
            $this->console(sprintf("End of running '%s' cli script.", get_class($this)), true);
        }

        return $this;
    }
110841
public function startCLISession()
    {
        $cm = DI::getInjector()->getInstance(CacheManager::class);
        $this->session_cache = $cm->getCache('cli-session');
        $ref = &$this->session_cache->get();

        $GLOBALS['_SESSION'] = &$ref;

        // Make sure the session variables are available through this object
        $this->values = &$ref;
        $this->set('CLI', true);
        $this->active = true;
        return $this;
    }
753933
function setUpBehat() {
    // Ensure that this system has headless Chrome.
    if (!$this->taskExec('which chromedriver')->run()->wasSuccessful()) {
      $os = exec('uname');
      // Here we assume either OS X (a dev's env) or not (a CI env).
      if ($os == 'Darwin') {
        $this->taskExec('brew install chromedriver')
          ->run();
      }
      else {
        $version = exec('curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE');
        $this->taskExec("wget http://chromedriver.storage.googleapis.com/{$version}/chromedriver_linux64.zip")
          ->run();
        $this->taskExec('unzip chromedriver_linux64.zip')
          ->run();
        $this->taskFilesystemStack()
          ->rename('chromedriver', 'vendor/bin/chromedriver')
          ->run();
        $this->taskFilesystemStack()
          ->remove('chromedriver_linux64.zip')
          ->run();
      }
    }
  }
843411
public function sync(){

            $this->data = $this->parent->driver->getData($this->name);

            return $this;

        }
228371
public function start()
    {
        if ( ! $this->isOpened()) {
            $this->open();
        }
        if ( ! $this->isLoaded()) {
            $this->read();
        }
        return $this;
    }
562727
public function start()
    {
        if ($this->active)
            return $this;

        if (PHP_SAPI === "cli")
        {
            $this->startCLISession();
        }
        else
        {
            // @codeCoverageIgnoreStart
            $this->startHTTPSession();
            // @codeCoverageIgnoreEnd
        }

        if (!$this->has('session_mgmt', 'start_time'))
            $this->set('session_mgmt', 'start_time', time());

        return $this;
    }
1354675
public function on() : self
    {
        $this->handler->setErrorHandler();
        $this->handler->setExceptionHandler();
        $this->handler->setFatalHandler();

        return $this;
    }
857803
public function stop(): DriverInterface
    {
        if ($this->process) {
            $this->process->stop();
            unset($this->process);
        }

        return $this;
    }
580320
protected function startSession()
    {
        $this->hook->trigger(self::HOOK_SESSION_START_BEFORE);

        $session = \Parable\DI\Container::get(\Parable\GetSet\Session::class);
        $session->start();

        $this->hook->trigger(self::HOOK_SESSION_START_AFTER, $session);
        return $this;
    }
855915
public function start()
    {
        foreach ($this->items as $run) {
            if (!$run->hasStarted()) {
                $run->start();
            }
        }
        return $this;
    }
275353
public function start()
    {
        $__scope = $this->_runHooks($this->_startHooks);
        extract($__scope);
        
        $this->_write($this->_socket, self::READY);
        
        /* Note the naming of the local variables due to shared scope with the user here */
        for (;;) {
            declare (ticks = 1);
            // don't exit on ctrl-c
            pcntl_signal(SIGINT, SIG_IGN, true);
            
            $this->_cancelled = false;
            
            $__input = $this->_transform($this->_read($this->_socket));
            
            if ($__input === null) {
                continue;
            }
            
            $__response = self::DONE;
            
            $this->_ppid = posix_getpid();
            $this->_pid  = pcntl_fork();
            
            if ($this->_pid < 0) {
                throw new \RuntimeException('Failed to fork child labourer');
            } elseif ($this->_pid > 0) {
                // kill the child on ctrl-c
                pcntl_signal(SIGINT, array(
                    $this,
                    'cancelOperation'
                ), true);
                pcntl_waitpid($this->_pid, $__status);
                
                if (!$this->_cancelled && $__status != (self::ABNORMAL_EXIT << 8)) {
                    $__response = self::EXITED;
                } else {
                    $this->_runHooks($this->_failureHooks);
                    $__response = self::FAILED;
                }
            } else {
                // if the user has installed a custom exception handler, install a new
                // one which calls it and then (if the custom handler didn't already exit)
                // exits with the correct status.
                // If not, leave the exception handler unset; we'll display
                // an uncaught exception error and carry on.
                $__oldexh = set_exception_handler(array(
                    $this,
                    'delegateExceptionHandler'
                ));
                if ($__oldexh && !$this->_userExceptionHandler) {
                    $this->_userExceptionHandler = $__oldexh; // save the old handler (once)
                } else {
                    restore_exception_handler();
                }
                
                // undo ctrl-c signal handling ready for user code execution
                pcntl_signal(SIGINT, SIG_DFL, true);
                $__pid = posix_getpid();
                
                $__result = eval($__input);
                
                if (posix_getpid() != $__pid) {
                    // whatever the user entered caused a forked child
                    // (totally valid, but we don't want that child to loop and wait for input)
                    exit(0);
                }
                
                if (preg_match('/\s*return\b/i', $__input)) {
                    fwrite(STDOUT, sprintf("%s\n", $this->_inspector->inspect($__result)));
                }
                $this->_expungeOldWorker();
            }
            
            $this->_write($this->_socket, $__response);
            
            if ($__response == self::EXITED) {
                exit(0);
            }
        }
    }
85526
public function wait(): Process
    {
        $cursor = $this->events->getCursor([
            'job' => $this->getId(),
            'status' => ['$gte' => JobInterface::STATUS_DONE],
        ]);

        while (true) {
            if (null === $cursor->current()) {
                if ($cursor->getInnerIterator()->isDead()) {
                    $this->events->create();

                    return $this->wait();
                }

                $this->events->next($cursor, function () {
                    $this->wait();
                });

                continue;
            }

            $event = $cursor->current();
            $this->events->next($cursor, function () {
                $this->wait();
            });

            $this->job['status'] = $event['status'];

            if (JobInterface::STATUS_FAILED === $this->job['status'] && isset($event['exception'])) {
                throw new $event['exception']['class'](
                    $event['exception']['message'],
                    $event['exception']['code']
                );
            }

            return $this;
        }
    }
1014293
public function start()
    {
        if (!$this->nested || !$this->depth) {
            $this->db->connect()->getConnection()->beginTransaction();
        }

        $this->depth++;

        return $this;
    }