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.