I'm having problems with the Laravel Dusk type() and value() method. I'm getting the following error.
$ php artisan dusk --group=activation
Warning: TTY mode is not supported on Windows platform.
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
DevTools listening on ws://127.0.0.1:12599/devtools/browser/84028821-2ca1-4d26-b66c-4697d2302117
E 1 / 1 (100%)
Time: 13,35 seconds, Memory: 18,00MB
There was 1 error:
1) Tests\Browser\CounselorActivationTest::testActivationWithSubscriptionWithPasswordLogin
Facebook\WebDriver\Exception\UnknownServerException: unknown error: call function result missing 'value'
(Session info: chrome=68.0.3440.84)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.17134 x86_64)
D:\devYubu\yubu\vendor\facebook\webdriver\lib\Exception\WebDriverException.php:114
D:\devYubu\yubu\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php:326
D:\devYubu\yubu\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php:547
D:\devYubu\yubu\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php:308
D:\devYubu\yubu\vendor\laravel\dusk\src\Concerns\InteractsWithElements.php:97
D:\devYubu\yubu\tests\Browser\tests\userActivation\CounselorActivationTest.php:58
D:\devYubu\yubu\vendor\laravel\dusk\src\TestCase.php:91
D:\devYubu\yubu\tests\Browser\tests\userActivation\CounselorActivationTest.php:95
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
I'm using the value method 2 times, I can see that the first one actually fills in the form, however the second one fails..
->value('input[name=external_id]', $counselor->getAttribute(User::COLUMN_EXTERNAL_ID))
->value('input[name=name_full]', $counselor->getAttribute(User::COLUMN_NAME_FULL))
When I'm using type(), the first one also fails:
->type('external_id', $counselor->getAttribute(User::COLUMN_EXTERNAL_ID))
->type('name_full', $counselor->getAttribute(User::COLUMN_NAME_FULL))
In using Windows 10. I'm running Dusk on Windows (I have PHP 7.2 installed). My application runs on Homestead with PHP 7.0. I'm using Laravel 5.4
This was a problem with an outdated ChromeDriver.
Big thanks to Jonas Staudenmeir, who has created a package for updating your Chromedriver:
https://github.com/staudenmeir/dusk-updater