Property | Type | Description | |
---|---|---|---|
$crawler | The DomCrawler instance. | ||
$inputs | array | All of the stored inputs for the current page. | |
$subCrawlers | array | Nested crawler instances used by the "within" method. | |
$uploads | array | All of the stored uploads for the current page. |
Method | Description | |
---|---|---|
dontSee ( string $text ) | Assert that a given string is not seen on the current HTML. | |
dontSeeElement ( string $selector, array $attributes = [] ) | Assert that an element is not present on the page. | |
dontSeeInElement ( string $element, string $text ) | Assert that a given string is not seen inside an element. | |
dontSeeInField ( string $selector, string $value ) | Assert that an input field does not contain the given value. | |
dontSeeIsChecked ( string $selector ) | Assert that the given checkbox is not selected. | |
dontSeeIsSelected ( string $selector, string $value ) | Assert that the given value is not selected. | |
dontSeeLink ( string $text, string | null $url = null ) | Assert that a given link is not seen on the page. | |
dontSeeText ( string $text ) | Assert that a given string is not seen on the current text. | |
see ( string $text, boolean $negate = false ) | Assert that a given string is seen on the current HTML. | |
seeElement ( string $selector, array $attributes = [], boolean $negate = false ) | Assert that an element is present on the page. | |
seeInElement ( string $element, string $text, boolean $negate = false ) | Assert that a given string is seen inside an element. | |
seeInField ( string $selector, string $expected, boolean $negate = false ) | Assert that an input field contains the given value. | |
seeIsChecked ( string $selector, boolean $negate = false ) | Assert that the given checkbox is selected. | |
seeIsSelected ( string $selector, string $value, boolean $negate = false ) | Assert that the expected value is selected. | |
seeLink ( string $text, string | null $url = null, boolean $negate = false ) | Assert that a given link is seen on the page. | |
seeText ( string $text, boolean $negate = false ) | Assert that a given string is seen on the current text. | |
visit ( string $uri ) | Visit the given URI with a GET request. | |
visitRoute ( string $route, array $parameters = [] ) | Visit the given named route with a GET request. | |
within ( string $element, Closure $callback ) | Narrow the test content to a specific area of the page. |
Method | Description | |
---|---|---|
assertFilterProducesResults ( string $filter ) | Assert that a filtered Crawler returns nodes. | |
assertInPage ( Illuminate\Foundation\Testing\Constraints\PageConstraint $constraint, boolean $reverse = false, string $message = '' ) | Assert the given constraint. | |
assertPageLoaded ( string $uri, string | null $message = null ) | Assert that a given page successfully loaded. | |
attach ( string $absolutePath, string $element ) | Attach a file to a form field on the page. | |
check ( string $element ) | Check a checkbox on the page. | |
clearInputs ( ) | Clear the inputs for the current page. | |
click ( string $name ) | Click a link with the given body, name, or ID attribute. | |
convertUploadsForTesting ( |
Convert the given uploads to UploadedFile instances. | |
crawler ( ) : |
Get the current crawler according to the test context. | |
extractParametersFromForm ( |
Extract the parameters from the given form. | |
fillForm ( string $buttonText, array $inputs = [] ) : |
Fill the form with the given data. | |
filterByNameOrId ( string $name, array | string $elements = '*' ) : |
Filter elements according to the given name or ID attribute. | |
followRedirects ( ) | Follow redirects from the last response. | |
getForm ( string | null $buttonText = null ) : |
Get the form from the page with the given submit button text. | |
getUploadedFileForTesting ( array $file, array $uploads, string $name ) : Illuminate\Http\UploadedFile | Create an UploadedFile instance for testing. | |
makeRequest ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [] ) | Make a request to the application and create a Crawler instance. | |
makeRequestUsingForm ( |
Make a request to the application using the given form. | |
prepareArrayBasedFileInput ( array &$uploads, string $key, mixed $file ) | Store an array based file upload with the proper nested array structure. | |
press ( string $buttonText ) | Submit a form using the button with the given text value. | |
resetPageContext ( ) | Clean the crawler and the subcrawlers values to reset the page context. | |
seePageIs ( string $uri ) | Assert that the current page matches a given URI. | |
seeRouteIs ( string $route, array $parameters = [] ) | Assert that the current page matches a given named route. | |
select ( string $option, string $element ) | Select an option from a drop-down. | |
storeInput ( string $element, string $text ) | Store a form input in the local array. | |
submitForm ( string $buttonText, array $inputs = [], array $uploads = [] ) | Submit a form on the page with the given input. | |
type ( string $text, string $element ) | Fill an input field with the given text. | |
uncheck ( string $element ) | Uncheck a checkbox on the page. |
protected assertFilterProducesResults ( string $filter ) | ||
$filter | string |
protected assertInPage ( Illuminate\Foundation\Testing\Constraints\PageConstraint $constraint, boolean $reverse = false, string $message = '' ) | ||
$constraint | Illuminate\Foundation\Testing\Constraints\PageConstraint | |
$reverse | boolean | |
$message | string |
protected convertUploadsForTesting ( |
||
$form | ||
$uploads | array | |
return | array |
protected crawler ( ) : |
||
return |
public dontSeeElement ( string $selector, array $attributes = [] ) | ||
$selector | string | |
$attributes | array |
public dontSeeInElement ( string $element, string $text ) | ||
$element | string | |
$text | string |
public dontSeeInField ( string $selector, string $value ) | ||
$selector | string | |
$value | string |
public dontSeeIsChecked ( string $selector ) | ||
$selector | string |
public dontSeeIsSelected ( string $selector, string $value ) | ||
$selector | string | |
$value | string |
public dontSeeText ( string $text ) | ||
$text | string |
protected extractParametersFromForm ( |
||
$form | ||
return | array |
protected followRedirects ( ) |
protected makeRequestUsingForm ( |
||
$form | ||
$uploads | array |
protected resetPageContext ( ) |
public seeIsChecked ( string $selector, boolean $negate = false ) | ||
$selector | string | |
$negate | boolean |
protected seeRouteIs ( string $route, array $parameters = [] ) | ||
$route | string | |
$parameters | array |
protected storeInput ( string $element, string $text ) | ||
$element | string | |
$text | string |
public visitRoute ( string $route, array $parameters = [] ) | ||
$route | string | |
$parameters | array |
protected Crawler,Symfony\Component\DomCrawler $crawler | ||
return |
protected array $inputs | ||
return | array |
protected array $subCrawlers | ||
return | array |
protected array $uploads | ||
return | array |