/
LocalWebDriver.php
55 lines (51 loc) · 1.83 KB
/
LocalWebDriver.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace Facebook\WebDriver\Local;
use Facebook\WebDriver\Exception\WebDriverException;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
/**
* @todo Break inheritance from RemoteWebDriver in next major version. (Composition over inheritance!)
*/
abstract class LocalWebDriver extends RemoteWebDriver
{
/**
* @param string $selenium_server_url
* @param null $desired_capabilities
* @param null $connection_timeout_in_ms
* @param null $request_timeout_in_ms
* @param null $http_proxy
* @param null $http_proxy_port
* @param DesiredCapabilities|null $required_capabilities
* @throws WebDriverException
* @return RemoteWebDriver
* @todo Remove in next major version (should not be inherited)
*/
public static function create(
$selenium_server_url = 'http://localhost:4444/wd/hub',
$desired_capabilities = null,
$connection_timeout_in_ms = null,
$request_timeout_in_ms = null,
$http_proxy = null,
$http_proxy_port = null,
DesiredCapabilities $required_capabilities = null
) {
throw new WebDriverException('Use start() method to start local WebDriver.');
}
/**
* @param string $session_id
* @param string $selenium_server_url
* @param null $connection_timeout_in_ms
* @param null $request_timeout_in_ms
* @throws WebDriverException
* @return RemoteWebDriver
* @todo Remove in next major version (should not be inherited)
*/
public static function createBySessionID(
$session_id,
$selenium_server_url = 'http://localhost:4444/wd/hub',
$connection_timeout_in_ms = null,
$request_timeout_in_ms = null
) {
throw new WebDriverException('Use start() method to start local WebDriver.');
}
}