PHP code example of naoray / dusk-automation

1. Go to this page and download the library: Download naoray/dusk-automation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

naoray / dusk-automation example snippets


use Laravel\Dusk\Browser;

class DoSomethingAutomated
{
    public function foo() {
        Dusk::browse(Browser $browser) {
            $browser->visit('some_website.com')
                ->assertSee('some website')
                ->press('#button')
                ->... // see laravel dusk docu for methods
        }
    }