I'm using Laravel 5.8 - Dusk.
I'd like to know how can I perform a right click on each element when iterating through them in the following example:
$browser->visit('https://www.website.com')
->script('window.scrollTo(0, 10000);');
$elems = $browser
->pause(1000)
->elements('.selectable');
foreach ($elems as $elem) {
$elem->rightClick(); // this does not work
}
Is it possible to perform a right click OR drag event on each of the elements? I basically want to perform any action on the element, because javascript changes an attribute on the element if it's being clicked, dragged, etc.
rightClick
method, but can't use it when iterating through the elements for some reason. – Radical_Activity