W3cubDocs

/Laravel 5.2

InteractsWithPages

trait InteractsWithPages (View source)

Methods

$this visit( string $uri)

Visit the given URI with a GET request.

$this within( string $element, Closure $callback)

Narrow the test content to a specific area of the page.

$this see( string $text, bool $negate = false)

Assert that a given string is seen on the current HTML.

$this dontSee( string $text)

Assert that a given string is not seen on the current HTML.

$this seeElement( string $selector, array $attributes = array(), bool $negate = false)

Assert that an element is present on the page.

$this dontSeeElement( string $selector, array $attributes = array())

Assert that an element is not present on the page.

$this seeText( string $text, bool $negate = false)

Assert that a given string is seen on the current text.

$this dontSeeText( string $text)

Assert that a given string is not seen on the current text.

$this seeInElement( string $element, string $text, bool $negate = false)

Assert that a given string is seen inside an element.

$this dontSeeInElement( string $element, string $text)

Assert that a given string is not seen inside an element.

$this seeLink( string $text, string|null $url = null, bool $negate = false)

Assert that a given link is seen on the page.

$this dontSeeLink( string $text, string|null $url = null)

Assert that a given link is not seen on the page.

$this seeInField( string $selector, string $expected, bool $negate = false)

Assert that an input field contains the given value.

$this dontSeeInField( string $selector, string $value)

Assert that an input field does not contain the given value.

$this seeIsSelected( string $selector, string $value, bool $negate = false)

Assert that the expected value is selected.

$this dontSeeIsSelected( string $selector, string $value)

Assert that the given value is not selected.

$this seeIsChecked( string $selector, bool $negate = false)

Assert that the given checkbox is selected.

$this dontSeeIsChecked( string $selector)

Assert that the given checkbox is not selected.

Details

$this visit( string $uri)

Visit the given URI with a GET request.

Parameters

string $uri

Return Value

$this

$this within( string $element, Closure $callback)

Narrow the test content to a specific area of the page.

Parameters

string $element
Closure $callback

Return Value

$this

$this see( string $text, bool $negate = false)

Assert that a given string is seen on the current HTML.

Parameters

string $text
bool $negate

Return Value

$this

$this dontSee( string $text)

Assert that a given string is not seen on the current HTML.

Parameters

string $text

Return Value

$this

$this seeElement( string $selector, array $attributes = array(), bool $negate = false)

Assert that an element is present on the page.

Parameters

string $selector
array $attributes
bool $negate

Return Value

$this

$this dontSeeElement( string $selector, array $attributes = array())

Assert that an element is not present on the page.

Parameters

string $selector
array $attributes

Return Value

$this

$this seeText( string $text, bool $negate = false)

Assert that a given string is seen on the current text.

Parameters

string $text
bool $negate

Return Value

$this

$this dontSeeText( string $text)

Assert that a given string is not seen on the current text.

Parameters

string $text

Return Value

$this

$this seeInElement( string $element, string $text, bool $negate = false)

Assert that a given string is seen inside an element.

Parameters

string $element
string $text
bool $negate

Return Value

$this

$this dontSeeInElement( string $element, string $text)

Assert that a given string is not seen inside an element.

Parameters

string $element
string $text

Return Value

$this

Assert that a given link is seen on the page.

Parameters

string $text
string|null $url
bool $negate

Return Value

$this

Assert that a given link is not seen on the page.

Parameters

string $text
string|null $url

Return Value

$this

$this seeInField( string $selector, string $expected, bool $negate = false)

Assert that an input field contains the given value.

Parameters

string $selector
string $expected
bool $negate

Return Value

$this

$this dontSeeInField( string $selector, string $value)

Assert that an input field does not contain the given value.

Parameters

string $selector
string $value

Return Value

$this

$this seeIsSelected( string $selector, string $value, bool $negate = false)

Assert that the expected value is selected.

Parameters

string $selector
string $value
bool $negate

Return Value

$this

$this dontSeeIsSelected( string $selector, string $value)

Assert that the given value is not selected.

Parameters

string $selector
string $value

Return Value

$this

$this seeIsChecked( string $selector, bool $negate = false)

Assert that the given checkbox is selected.

Parameters

string $selector
bool $negate

Return Value

$this

$this dontSeeIsChecked( string $selector)

Assert that the given checkbox is not selected.

Parameters

string $selector

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Foundation/Testing/Concerns/InteractsWithPages.html