WebDriver
interface WebDriver implements WebDriverSearchContext (View source)
The interface for WebDriver.
Methods
Find the first WebDriverElement within this element using the given mechanism.
Find all WebDriverElements within this element using the given mechanism.
Get a string representing the current URL that the browser is looking at.
Get the source of the last loaded page.
Get the title of the current page.
Return an opaque handle to this window that uniquely identifies it within this driver instance.
Get all window handles available to the current session.
Quits this driver, closing every associated window.
Take a screenshot of the current page.
Construct a new WebDriverWait by the current WebDriver instance.
An abstraction for managing stuff you would do in a browser menu. For example, adding and deleting cookies.
An abstraction allowing the driver to access the browser's history and to navigate to a given URL.
Switch to a different window or frame.
No description
Details
WebDriverElement
findElement(WebDriverBy $locator)
Find the first WebDriverElement within this element using the given mechanism.
WebDriverElement[]
findElements(WebDriverBy $locator)
Find all WebDriverElements within this element using the given mechanism.
WebDriver
close()
Close the current window.
WebDriver
get(string $url)
Load a new web page in the current browser window.
string
getCurrentURL()
Get a string representing the current URL that the browser is looking at.
string
getPageSource()
Get the source of the last loaded page.
string
getTitle()
Get the title of the current page.
string
getWindowHandle()
Return an opaque handle to this window that uniquely identifies it within this driver instance.
array
getWindowHandles()
Get all window handles available to the current session.
quit()
Quits this driver, closing every associated window.
string
takeScreenshot(string $save_as = null)
Take a screenshot of the current page.
WebDriverWait
wait(int $timeout_in_second = 30, int $interval_in_millisecond = 250)
Construct a new WebDriverWait by the current WebDriver instance.
Sample usage:
$driver->wait(20, 1000)->until( WebDriverExpectedCondition::titleIs('WebDriver Page') );
WebDriverOptions
manage()
An abstraction for managing stuff you would do in a browser menu. For example, adding and deleting cookies.
WebDriverNavigationInterface
navigate()
An abstraction allowing the driver to access the browser's history and to navigate to a given URL.
WebDriverTargetLocator
switchTo()
Switch to a different window or frame.
mixed
execute(string $name, array $params)
No description