Questions tagged [laravel-dusk]

Laravel Dusk provides an expressive, easy-to-use browser automation and testing API. By default, Dusk does not require you to install JDK or Selenium on your machine. Instead, Dusk uses a standalone ChromeDriver installation. However, you are free to utilize any other Selenium compatible driver you wish.

420 questions
18
votes
1 answer

How to reuse a Dusk test browser instance?

My project on the Laravel 5.4 framework and I am using Dusk for browser tests. I have a page that has several sections I'd like to test independently, however I'm running into the problem where I have to start a new browser instance, login, and…
amflare
  • 3,602
  • 3
  • 20
  • 39
15
votes
2 answers

Get Laravel Dusk to Run Properly on Ubuntu 16 wt Laravel 5.5

I've been trying to integrate Laravel Dusk into my testing scheme for a week and can't get any test to actually deliver expected results. Here's the situation: I'm running Laravel 55 on Homestead (per Project install) with php 7.1.* I installed…
Chukky Nze
  • 672
  • 3
  • 12
15
votes
7 answers

Laravel Dusk, how to destroy session data between tests

I am getting started using Laravel Dusk for browser testing, and have created a couple of tests to test my login form. I have the following code: class LoginTest extends DuskTestCase { public function testLogin() { $this->browse(function…
Inigo
  • 6,604
  • 15
  • 52
  • 94
13
votes
2 answers

Laravel 5.4; How to run unit tests from a Laravel package?

I am trying to develop a Laravel composer package and run unit tests from within it. After spending the last couple of days reading various outdated and contradictory guides and blogposts, I am completely confused as to how to go about this. Here's…
Inigo
  • 6,604
  • 15
  • 52
  • 94
13
votes
4 answers

How to scroll down browser page - Laravel Dusk (Browser Tests)

I'm preparing tests using [Browser Tests (Laravel Dusk)][1] [1]: https://laravel.com/docs/5.4/dusk and I need force click to element which is not see before scroll down browser page. How can define in dusk test to click unsee element or scroll…
Tomasz
  • 1,301
  • 3
  • 16
  • 28
12
votes
2 answers

Code coverage for laravel dusk

Is there any way to get code coverage when running Laravel Dusk? I know it runs browser tests so it's not scrutinizing code, but is there a way to add a listener to check what code is covered? I did not see anything on this subject now.
rap-2-h
  • 23,287
  • 23
  • 130
  • 217
11
votes
1 answer

testing a new window with laravel dusk

I have this page that, when a particular button is clicked, a new window pops up (eg. an anchor tag with _target = blank). I want to verify that a string of text appears in this new window but, with Laravel Dusk, assertSee appears to be testing the…
neubert
  • 14,208
  • 21
  • 90
  • 172
10
votes
4 answers

How to solve Exception It is unsafe to run Dusk in production in laravel 5.5?

I upgrated my project from laravel 5.4 to laravel 5.5 , I dont have any problem in local env but in server i get this exception , I searched a lot and i know this issue may be duplicated but no solutions solved my problem! How can i not registering…
Samira kalantari
  • 302
  • 1
  • 2
  • 16
10
votes
1 answer

Laravel dusk not working .env.dusk.local

I have an application and I want to use Laravel Dusk. I created a file named .env.dusk.local with a database for tests and a file named .env with my default database. I ran the php artisan command and created a user by /register. After I created a…
Lucas Lopes
  • 1,213
  • 1
  • 11
  • 21
9
votes
3 answers

Options for recording the tasks done in a browser for UI Automation Test

Is there a tool that can record user interactions with DOM elements for usage in creating automated tests (I'm using Codeception and Laravel Dusk but any tool with roots in Selenium is fine). I'm looking for something to record a sequence and get…
artlung
  • 30,810
  • 16
  • 66
  • 118
8
votes
3 answers

Laravel Dusk how to show the browser while executing tests

I am writing some tests and I want to see whether Dusk correctly fills in the input fields but Dusk doesn't show the browser while running the tests, is there any way to force it to do that?
Petar Vasilev
  • 3,299
  • 4
  • 31
  • 59
8
votes
1 answer

Class 'Laravel\Dusk\DuskServiceProvider' not found

I updated composer using composer update having error To resolve this i tried to do composer require --dev laravel/dusk This is throwing Any thing which i am missing ? Please assist.
Abdul Qadir
  • 742
  • 1
  • 6
  • 23
8
votes
2 answers

Laravel Dusk NoSuchElementException / Unable to locate element

I'm trying to run some basic Laravel Dusk Tests but always running into problems with the Facebook WebDriver: I already updated chrome to the latest version and manually updated the Chrome WebDriver with Hombrew: Any suggestions? Cheers,…
Stan Barrows
  • 513
  • 1
  • 7
  • 20
8
votes
2 answers

Laravel Phpunit and Dusk with CircleCI

Has anybody been able to get Laravel Dusk working on CircleCI. I can get my build working and tested with PHPUnit but it fails for Laravel Dusk. I have a base Laravel installation with Dusk installed. When I get to the php artisan dusk command, I…
whoacowboy
  • 5,969
  • 6
  • 33
  • 65
8
votes
7 answers

Laravel Dusk - Class config does not exist

recently upgraded a 5.3 project to 5.4 and all seemed good. Today I started to implement Dusk however had hit an issue when running the example test ☁ footy-finance [5.4] ⚡ php artisan dusk PHPUnit 6.0.0 by Sebastian Bergmann and contributors. E …
Owen
  • 5,225
  • 14
  • 56
  • 102
1
2 3
27 28