WhitreDragon's avatar

Operation interruption of laravel dusk

I want to use laravel dask's headless browsing to do some repetitive and automated operations, which is equivalent to simulating a human operation to log in to a website to listen to some data or obtain data, but now I have some problems. When I run the command, the first part can be executed normally, but I can't continue in the future. What is the problem with the code and how to solve it?

$this->browse(function (Browser $browser)  {
    $webUrl = 'https://my.xxxxx.com/login';
   
    $browser->visit($bankUrl)
        ->pause(10000)
        ->typeSlowly('mobile', '8301061224')
        ->pause(1000)
        ->press('Login')
        ->waitForText('Username')
        ->assertSee('Username');

    $browser->waitFor('#username')
        ->typeSlowly('username', 'White')
        ->pause(1000)
        ->press('Proceed');

    $browser->waitFor('#password')
        ->assertSee('Enter Password')
        ->typeSlowly('password', '123456')
        ->press('Login');
});					

0 likes
0 replies

Please or to participate in this conversation.