browser
browser copied to clipboard
fill a form, listen for page-changing events
First, what a cool library! I was fighting with authenticated users in my tests, still not sure what the problem was, but the actingAs() method works so easily that I'm switching my tests to this.
Two related feature requests. I'd like to be able to fill out a form more easily, and I'd like an event for clicks and submits.
$browser->getForm('registration')
->fill(['email' => '[email protected]', 'name' => 'Mr. Ed', 'plainPassword' => 'passw0rd'])
->submit()
->assert...
Perhaps something like this already exists?
I'd like to create a log that shows the page the test is on, and movement sequence (usually clicked on a link or submitted a form). I used to do that in behat and found it valuable. Start on the homepage (/). Click 'register'. Fill out the form with [...], click "My profile", click "add interests", etc.
But really I just wanted to say how great the tool is, but in order to create an issue I figured I'd add some low-priority wish list item. Thanks again for releasing this, it's so much easier to work with than the regular phpunit client.