Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ivanmiranda's avatar

Laravel dusk tests failing

Hello,

I'm developing an app and I was interested in Laravel Dusk's tests functionality to automatize some tasks, but running the tests I've realised that they work poorly 1 of 10 average, more or less. The usual exception that dumps into the screen is this:


Warning: TTY mode is not supported on Windows platform.
PHPUnit 7.5.7 by Sebastian Bergmann and contributors.


DevTools listening on ws://127.0.0.1:61761/devtools/browser/dc039dbb-c23a-4866-b
8cc-8c0a9be5e32e
E                                                                   1 / 1 (100%)

Time: 1.7 minutes, Memory: 16.00 MB

There was 1 error:

1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http
GET to /session/e2eeb262cfbb9b5ebbd2aaff134b9ab7/screenshot

Operation timed out after 30000 milliseconds with 0 bytes received

C:\xampp\htdocs\k24\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php
:292
C:\xampp\htdocs\k24\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php:547
C:\xampp\htdocs\k24\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php:345
C:\xampp\htdocs\k24\vendor\laravel\dusk\src\Browser.php:274
C:\xampp\htdocs\k24\vendor\laravel\dusk\src\Concerns\ProvidesBrowser.php:139
C:\xampp\htdocs\k24\vendor\laravel\framework\src\Illuminate\Support\Collection.p
hp:419
C:\xampp\htdocs\k24\vendor\laravel\dusk\src\Concerns\ProvidesBrowser.php:140
C:\xampp\htdocs\k24\vendor\laravel\dusk\src\Concerns\ProvidesBrowser.php:69
C:\xampp\htdocs\k24\tests\Browser\ExampleTest.php:44

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.


I've tried with pause() method and making several assertions in order to give the server more time to respond, but with no luck. I'm thinking about making an approach with jQuery. Anyone that has been dealing with Dusk would know about this? Or jQuery? Thanks.

0 likes
2 replies
devfrey's avatar

So clearly it times out. What does the feature under test do?

ivanmiranda's avatar

It is supposed to upload an item on ebay to sell it. I was just with the beginning. The code is this:

<?php

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()
    {
        $this->browse(function (Browser $browser) {

            $browser->visit('https://www.ebay.es/')
                    ->assertSeeLink('Identifícate')
                    ->clickLink('Identifícate')
                    ->type('userid', 'mail')
                    ->type('pass', 'pass')
                    ->click('#sgnBt');
        });
    }
}

Please or to participate in this conversation.