laravel-dusk

Errors running Laravel Dusk

南楼画角 提交于 2019-12-31 03:19:27
问题 I just discovered Laravel Dusk, and I was excited to use it in my project. However, it can't seem to get it to work. I followed the Laravel Documentation to install Dusk. When I run php artisan dusk in the terminal, I get [Symfony\Component\Process\Exception\RuntimeException] TTY mode is not supported on Windows platform. I found this (https://github.com/laravel/dusk/pull/13/files) which is supposed to fix it I think, but I still get the error. Also, I attempted to run the Dusk tests through

How to override env variables in Laravel Dusk

爷,独闯天下 提交于 2019-12-29 02:09:45
问题 Unfortunately config(['key' => 'newValue']) doesn't work in a Dusk setup (for overriding a config value), presumably because it would change the config of the system running the test rather than the experience of the headless browser that gets opened to execute the flow. And sometimes I can see no way around needing to temporarily change an env value for a certain Dusk test. E.g. temporarily set QUEUE_DRIVER=sync when usually it is 'dusk-connection', but in one particular test, I need to

How to override env variables in Laravel Dusk

主宰稳场 提交于 2019-12-29 02:09:15
问题 Unfortunately config(['key' => 'newValue']) doesn't work in a Dusk setup (for overriding a config value), presumably because it would change the config of the system running the test rather than the experience of the headless browser that gets opened to execute the flow. And sometimes I can see no way around needing to temporarily change an env value for a certain Dusk test. E.g. temporarily set QUEUE_DRIVER=sync when usually it is 'dusk-connection', but in one particular test, I need to

Using a proxy server with Laravel Dusk

和自甴很熟 提交于 2019-12-25 01:46:20
问题 I have looked at the docks and searched the code but can find no mention of proxy support. So it seems there is no native way to do this. However I have found the following code that allows the headless chrome binary to be used with proxy settings. DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setCapability("chrome.switches", Arrays.asList("--proxy-server=http://user:password@proxy.com:8080")); WebDriver driver = new ChromeDriver(capabilities); So my question

Show Laravel Dusk tests from Homestead on Windows

*爱你&永不变心* 提交于 2019-12-24 08:59:58
问题 I'm playing with Laravel Dusk for the first time. I've running it on Homestead. It's running the example test, and give me the right feedback. Now, I want to know if it's possible to see Dusk running in a browser. I run it on Vagrant Homestead, the VM is installed on my Windows 10 machine. Can I show the tests from homestead on my windows machine? If it's not possible, but it is possible if I run Dusk from Windows it self. How can I start running it in windows. Do I need XAMPP for it? So

Curl error thrown for http POST to /session with params: Facebook\WebDriver\Exception

て烟熏妆下的殇ゞ 提交于 2019-12-24 01:55:16
问题 Does anyone encountered this type of error when you run laravel 5.6 dusk ERRor Log in the Terminal: Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["--disable-gpu","--headless"]}}} Failed to connect to localhost port 9515: Connection refused 回答1: Make sure your chrome-driver is executable and running. Try following command ./vendor

How to create .env file for test with Laravel Dusk

时间秒杀一切 提交于 2019-12-23 08:57:35
问题 I'm using Dusk to do a simple login test. I created a .env.dusk file so that the test uses an alternate database and does not delete the data that was registered on the platform. Archive .env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_dusk DB_USERNAME=root DB_PASSWORD=123456 Archive .env.dusk DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_dusk_test DB_USERNAME=root DB_PASSWORD=123456 LoginTest.php namespace Tests\Browser; use Tests

Laravel Dusk: The correct localhost port for APP_URL on a remote server?

前提是你 提交于 2019-12-23 03:39:06
问题 I am trying to install Dusk on Laravel at a REMOTE host and at some point I need to change the .env file like this APP_URL=http://localhost:8000 Another tutorial suggested something like APP_URL=http://localhost:9515 For a remote host, do I need to put "http://localhost:????" and if I need how do I find the port number? I not do I just leave it as "/"? By the way, I have tested several options and non have worked so far so but I am not sure what causes it so I am trying to pint point the

Laravel dusk chrome driver timeout

…衆ロ難τιáo~ 提交于 2019-12-23 00:43:48
问题 Can anyone help, I am unable to get Laravel dusk to run the default sample test in my current Laravel 5.6 project on mac high sierra. Error message Time: 2.5 minutes, Memory: 14.00MB There was 1 error: 1) Tests\Browser\ExampleTest::testBasicExample Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"/Users/keith/Desktop/dusk/vendor/laravel/dusk

Laravel Dusk + Vue with ElementUI

泪湿孤枕 提交于 2019-12-21 23:48:21
问题 I need help writting test with Laravel Dusk. I'm using Vue with ElementUI. I really like this framework, however, I can't use Dusk's build-in select() method in my tests. It's because the select component of ElementUI does not generate a real <select> tag, instead, it creates a normal <input> (that is readonly) and, at bottom of the page, the popper with select's options, so, there is not a <select> tag in my page, only a <div> and a readonly <input> . How can I write a test with Dusk that