$executor
$executor : \HttpCommandExecutor
$executor : \HttpCommandExecutor
$mouse : \RemoteMouse
$keyboard : \RemoteKeyboard
$touch : \RemoteTouchScreen
$executeMethod : \RemoteExecuteMethod
create() : \RemoteWebDriver
Construct the RemoteWebDriver by a desired capabilities.
createBySessionID() : \RemoteWebDriver
[Experimental] Construct the RemoteWebDriver by an existing session.
This constructor can boost the performance a lot by reusing the same browser for the whole test suite. You do not have to pass the desired capabilities because the session was created before.
close() : \RemoteWebDriver
Close the current window.
The current instance.
findElement(\WebDriverBy $by) : \RemoteWebElement
Find the first WebDriverElement using the given mechanism.
| \WebDriverBy | $by |
NoSuchElementException is thrown in HttpCommandExecutor if no element is found.
findElements(\WebDriverBy $by) : array<mixed,\RemoteWebElement>
Find all WebDriverElements within the current page using the given mechanism.
| \WebDriverBy | $by |
A list of all WebDriverElements, or an empty array if nothing matches
get(string $url) : \RemoteWebDriver
Load a new web page in the current browser window.
| string | $url |
The current instance.
executeScript(string $script, array $arguments = array()) : mixed
Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame. The executed script is assumed to be synchronous and the result of evaluating the script will be returned.
| string | $script | The script to inject. |
| array | $arguments | The arguments of the script. |
The return value of the script.
executeAsyncScript(string $script, array $arguments = array()) : mixed
Inject a snippet of JavaScript into the page for asynchronous execution in the context of the currently selected frame.
The driver will pass a callback as the last argument to the snippet, and block until the callback is invoked.
| string | $script | The script to inject. |
| array | $arguments | The arguments of the script. |
The value passed by the script to the callback.
wait(integer $timeout_in_second = 30, integer $interval_in_millisecond = 250) : \WebDriverWait
Construct a new WebDriverWait by the current WebDriver instance.
Sample usage:
$driver->wait(20, 1000)->until(
WebDriverExpectedCondition::titleIs('WebDriver Page')
);
| integer | $timeout_in_second | |
| integer | $interval_in_millisecond |
manage() : \WebDriverOptions
An abstraction for managing stuff you would do in a browser menu. For example, adding and deleting cookies.
navigate() : \WebDriverNavigation
An abstraction allowing the driver to access the browser's history and to navigate to a given URL.
switchTo() : \WebDriverTargetLocator
Switch to a different window or frame.
getMouse() : \RemoteMouse
getKeyboard() : \RemoteKeyboard
getTouch() : \RemoteTouchScreen
action() : \WebDriverActions
Construct a new action builder.
getActiveElement() : \RemoteWebElement
Get the element on the page that currently has focus.
setCommandExecutor(\WebDriverCommandExecutor $executor) : \RemoteWebDriver
Set the command executor of this RemoteWebdrver
| \WebDriverCommandExecutor | $executor |
getCommandExecutor() : \HttpCommandExecutor
Set the command executor of this RemoteWebdriver
setSessionID(string $session_id) : \RemoteWebDriver
Set the session id of the RemoteWebDriver.
| string | $session_id |
start(\DesiredCapabilities $desired_capabilities = null)
| \DesiredCapabilities | $desired_capabilities |
newElement(string $id) : \RemoteWebElement
Return the WebDriverElement with the given id.
| string | $id | The id of the element to be created. |