updated-packages
This commit is contained in:
45
vendor/php-webdriver/webdriver/lib/WebDriverNavigation.php
vendored
Normal file
45
vendor/php-webdriver/webdriver/lib/WebDriverNavigation.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Facebook\WebDriver;
|
||||
|
||||
use Facebook\WebDriver\Remote\DriverCommand;
|
||||
use Facebook\WebDriver\Remote\ExecuteMethod;
|
||||
|
||||
class WebDriverNavigation implements WebDriverNavigationInterface
|
||||
{
|
||||
protected $executor;
|
||||
|
||||
public function __construct(ExecuteMethod $executor)
|
||||
{
|
||||
$this->executor = $executor;
|
||||
}
|
||||
|
||||
public function back()
|
||||
{
|
||||
$this->executor->execute(DriverCommand::GO_BACK);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function forward()
|
||||
{
|
||||
$this->executor->execute(DriverCommand::GO_FORWARD);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function refresh()
|
||||
{
|
||||
$this->executor->execute(DriverCommand::REFRESH);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function to($url)
|
||||
{
|
||||
$params = ['url' => (string) $url];
|
||||
$this->executor->execute(DriverCommand::GET, $params);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user