executor = $executor; } /** * Move back a single entry in the browser's history, if possible. * * @return WebDriverNavigation The instance. */ public function back() { $this->executor->execute(DriverCommand::GO_BACK); return $this; } /** * Move forward a single entry in the browser's history, if possible. * * @return WebDriverNavigation The instance. */ public function forward() { $this->executor->execute(DriverCommand::GO_FORWARD); return $this; } /** * Refresh the current page. * * @return WebDriverNavigation The instance. */ public function refresh() { $this->executor->execute(DriverCommand::REFRESH); return $this; } /** * Navigate to the given URL. * * @param string $url * @return WebDriverNavigation The instance. */ public function to($url) { $params = ['url' => (string) $url]; $this->executor->execute(DriverCommand::GET, $params); return $this; } }