i want execute laravel dusk test with parameter, so i did try like this
php artisan dusk --filter ExampleTest::testBasicExample( here parameter );
in the console, but it is not working and i got syntax error
i want to know what to execute testing code with parameter
it is impossible??
please tell me what to do .......
------ below is my dusk code
namespace Tests\Browser;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ExampleTest extends DuskTestCase
{
/**
* A basic browser test example.
*
* @return void
*/
public function testBasicExample($aa = 'dd')
{
return dd($aa);
$this->browse(function (Browser $browser) {
$browser->visit('https://www.naver.com');
$aa = $browser->element('#account > div > div > span > a:nth-child(1)')->getAttribute('innerHTML');
});
}
You didn't close the function testBasicExample
. Add a curly bracket }
after the $this->browse(...)
line