\duncan3dc\LaravelDusk

Summary

Methods
Properties
Constants
__construct()
setBaseUrl()
__call()
getBrowser()
getDriver()
visit()
screenshot()
executeScript()
__destruct()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
applyBaseUrl()
$browser
$baseUrl
N/A

Properties

$browser

$browser : \Laravel\Dusk\Browser

Type

\Laravel\Dusk\Browser — The browser instance to use.

$baseUrl

$baseUrl : string

Type

string — The base url.

Methods

setBaseUrl()

setBaseUrl(string  $url) : $this

Set the base url to use.

Parameters

string $url

The base url

Returns

$this

__call()

__call(string  $function, array  $args) : mixed

Proxy any methods to the internal browser instance.

Parameters

string $function

The method name to call

array $args

The parameters to pass to the method

Returns

mixed

getBrowser()

getBrowser() : \Laravel\Dusk\Browser

Get the internal Browser instance in use.

Returns

\Laravel\Dusk\Browser

getDriver()

getDriver() : \Facebook\WebDriver\Remote\RemoteWebDriver

Get the internal web driver instance in use.

Returns

\Facebook\WebDriver\Remote\RemoteWebDriver

visit()

visit(string  $url) : $this

Browse to the given URL.

Parameters

string $url

The URL to visit

Returns

$this

screenshot()

screenshot(string  $filename) : $this

Take a screenshot and store it on disk.

Parameters

string $filename

The filename to store (no extension)

Returns

$this

executeScript()

executeScript(string  $script) : \duncan3dc\Laravel\$this;

Run some javascript in the browser.

Parameters

string $script

The javascript to run

Returns

\duncan3dc\Laravel\$this;

__destruct()

__destruct() 

Ensure the browser is closed down after use.

applyBaseUrl()

applyBaseUrl(string  $url) : string

Ensure the passed url uses the current base.

Parameters

string $url

The URL to convert

Returns

string