我尝试了拉维尔黄昏的简单演示,但我得到了以下错误;我试图按照某些解决方案的建议更新composer安装程序,并尝试设置命令。php就像git上建议的那样,但仍然存在错误。
警告:Windows平台不支持TTY模式。
PHPUnit 7.3.5由塞巴斯蒂安·伯格曼和贡献者撰写。
[1004/130622.087:错误:gpu_process_transport_factory.cc(1007)]丢失了UI共享上下文。
-
Tests\Browser\RegisterTest::testExample
Facebook\WebDriver\Exception\UnknownServerException:未知错误:无法读取未定义的属性“click”
(会话信息:无头镀铬=69.0.3497.100)
(驱动程序信息:chromedriver=2.35.528161(5b82f2d2aae0ca24b877009200ced9065a772e73),平台=Windows NT 10.0.17134 x86_64)
我正在Windows 10中尝试这个演示。
下面是我的注册测试。php
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class RegisterTest extends DuskTestCase
{
/**
* A Dusk test example.
*
* @return void
*/
public function testExample()
{
$this->browse(function ($browser) {
$browser->visit('/') //Go to the homepage
->clickLink('Register') //Click the Register link
->assertSee('Register') //Make sure the phrase in the argument is on the page
//Fill the form with these values
->value('#name', 'Joe')
->value('#email', 'joe@example.com')
->value('#password', '123456')
->value('#password-confirm', '123456')
->click('button[type="submit"]') //Click the submit button on the page
->assertPathIs('/home') //Make sure you are in the home page
//Make sure you see the phrase in the argument
->assertSee("You are logged in!");
});
}
}