2017-11-01 1 views
0

황혼 문제 내 Mac에 사용자 지정 URL이 포함 된 Vagrant 상자가 실행 중입니다. DuskTestCase.php을 편집하고 http://localhost:9515$this->local = http://mysite.dev으로 바꿔야했습니다. 오류 다음 $php artisan dusk tests/Browser/LoginTest.php 출력 : 나는 $this->local = http://www.google.com:80$browser->visit('/')->dump();를 교체 할 때이 구글 페이지의 내용을 덤프Laravel dusk wagrant 상자 DesiredCapabilities :: __ construct()

Tests\Browser\LoginTest::testLogin 
TypeError: Argument 1 passed to Facebook\WebDriver\Remote\DesiredCapabilities::__construct() must be of the type array, null given, called in /Users/gmylonas/Vagrant Projects/mywebsite/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php on line 127 

/Users/gmylonas/Vagrant Projects/mywebsite/vendor/facebook/webdriver/lib/Remote/DesiredCapabilities.php:33 
/Users/gmylonas/Vagrant Projects/mywebsite/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:127 
/Users/gmylonas/Vagrant Projects/mywebsite/tests/DuskTestCase.php:46 
/Users/gmylonas/Vagrant Projects/mywebsite/vendor/laravel/dusk/src/TestCase.php:210 
/Users/gmylonas/Vagrant Projects/mywebsite/vendor/laravel/framework/src/Illuminate/Support/helpers.php:762 
/Users/gmylonas/Vagrant Projects/mywebsite/vendor/laravel/dusk/src/TestCase.php:211 
/Users/gmylonas/Vagrant Projects/mywebsite/vendor/laravel/dusk/src/TestCase.php:117 
/Users/gmylonas/Vagrant Projects/mywebsite/vendor/laravel/dusk/src/TestCase.php:89 
/Users/gmylonas/Vagrant Projects/mywebsite/tests/Browser/LoginTest.php:23 

! $this->local = http://localhost:9515는 빈 페이지를 덤프

<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body></body></html> 

: 질문 : 내 상자의 URL에서 작동하지 않습니다 어떻게 그것을 해결하는 이유는 무엇입니까?

감사합니다.

답변

1

다른 점은 http://localhost:9515을 업데이트하지 말아야한다는 것입니다. 이것은 셀렌 드라이버이며 기본적으로이 포트를 사용하므로 문제없이 작동합니다. 기본적으로

실행 :

$browser->visit('/') 

는 다른 변경없이 페이지의 기본 URL을 방문해야합니다. 그러나 응용 프로그램에 따라 응용 프로그램에서 도메인 검사를 수행 할 때 특히 .env 파일에 APP_URL을 설정해야 할 수도 있습니다.

+0

나는 그것을 얻지 않는다. – ichimaru

관련 문제