I’m kind of new to Laravel and Dusk-Tests and encountering issues with the LaravelDuskBrowser keys()-method. It looks like, that the sent commands are ignored by Chrome. This is the code:
$browser->visit('/index')
->assertSee('secret phrase')
->pause(300)
->click('#selector')
->pause(1000)
->keys('#selector', [
WebDriverKeys::DOWN,
WebDriverKeys::DOWN,
WebDriverKeys::ENTER,
])
What I try to do is to select the second element of a -field. While click() works and opens the dropdown, the keys() simply does nothing.
I’m wondering if this maybe related to me using a Mac (macOS 14.7) or with the current Chrome or Chromedriver (129.0.6668.58)
Thanks for your help!
I’ve setup a plain Laravel 11 project with a fresh Dusk installation and a sample page. The problem remains. Also tried to Debug the communication between Dusk and the Chromedriver. I can see, that the commands should be sent, but yeah. Nothing happens when I watch how Chrome is remotely controlled by the test.