通过 laravel dusk 测试输入类型日期

testing input type date through laravel dusk

正在尝试测试以下输入元素

<input name="birthdate" id="#birthdate" class="input" type="date">

通过LaravelDusk 我试过了

$browser->type('birthdate', now()->toDateString())

结束甚至

->type('birthdate', '31-01-2003')

->type('birthdate', '31-Jan-2003')

没有插入数据,甚至没有按下提交按钮。转储显示我将保留在表单上而不提交。

Chrome版本:

(Session info: headless chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615291 
"laravel/dusk","version": "v4.0.4",

谢谢

需要正确格式化

->type('birthdate', $newuser->birthdate->format('mdY'))