Laravel 5: Testing – Cheatsheet: Laravel Dusk testing element interactions

Cheatsheet: Laravel Dusk testing element interaction methods

Laravel Dusk: list of page elements interaction methods.

Dynamically assign, or remove values from page elements.

[one_third]
clickLink
value
text
attribute
keys
type
append
clear
select
[/one_third][one_third]
radio
check
uncheck
attach
press
pressAndWaitFor
script
drag
dragUp
[/one_third][one_third_last]
dragDown
dragLeft
dragRight
dragOffset
acceptDialog
typeInDialog
dismissDialog
[/one_third_last]


Methods listed above in dark color have not been tested (yet)

Important – Dialog Methods

This is not about modal dialogs, e.g. Bootstrap Modal Dialog.
This method tests these little pesky, page locking JavaScript
popups triggered by JS code alert(‘some stuff here’);


value

text

attribute

keys

type

append

clear

select

radio

check

uncheck

attach

press (click) button

pressAndWaitFor

script