Questions tagged [laravel-dusk2]

27 questions
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
  • 720
  • 3
  • 13
5
votes
1 answer

Simulate key with Laravel Dusk (without input element)

I have a page which consists of some disabled inputs, spans and divs. In the background I wait for pressed keys. Background of this is some memory game. My problem is, that it turned out to be pretty hard to test. I know two functions to simulate…
TimSch
  • 1,189
  • 1
  • 12
  • 27
4
votes
1 answer

Laravel Serve command does not respect --env parameter

To be able to run Browser tests directly in my IDE (without using the artisan dusk command), I want to run php artisan serve --env=dusk.local. While it indeed starts the local PHP server, it uses the wrong database. It uses the database specified in…
TimSch
  • 1,189
  • 1
  • 12
  • 27
4
votes
0 answers

Is it possible to open and select a file in explorer at browser test of Laravel Dusk?

Im new to Laravel5. I want to browser test with Laravel Dusk. I already have a Java code but can not find the way to code in Laravel Dusk. public void test() { WebDriver driver = new FirefoxDriver(); …
3
votes
1 answer

Not able to check checkbox elements in Laravel Dusk

I'm trying to do test cases for my application on Laravel 6.0 with Dusk. I'm facing some difficulties in checkbox selection, it is not finding the 'check' element. As per the documentation I have used the check method and defined the selector with…
3
votes
0 answers

Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element

I have this code @forelse($companies as $company)
flower
  • 989
  • 4
  • 16
  • 34
3
votes
4 answers

Laravel Dusk how to check if element is visible/clickable?

I have a scenario where I'd like not check IF an element exists and is visible/clickable. If not, script processing continues. While Laravel Dusk provides $browser->assertVisible($selector) method, this ends up in an exception if the element is not…
ux.engineer
  • 10,082
  • 13
  • 67
  • 112
3
votes
5 answers

PhpStorm Laravel Dusk w/ a testing database

I currently have PhpStorm running Dusk Test successfully however, I would like it to use the testing database I have set up. Per other threads and resources online, I have created the .env.dusk.local and phpunit.dusk.xml that points to the testing…
likwidmonster
  • 403
  • 1
  • 5
  • 18
3
votes
2 answers

Laravel Dusk: Element is not clickable at point (x, y). Other Element would receive the click

I am trying to check the checkbox with laravel Dusk which contains other clickable links like Terms of Service and Privacy Policy When I try to check this checkbox on my test I get the following error Element is not clickable at point (466, 438).…
hashmi
  • 651
  • 2
  • 9
  • 24
3
votes
0 answers

Sending POST call from laravel dusk browser

How can we send POST request from dusk browser ? I am sending the POST request, in dusk test case, from admin user to login as a different user but debugging shows that it gives 403 error, which is obvious as i am not sending the request through the…
hashmi
  • 651
  • 2
  • 9
  • 24
2
votes
1 answer

How to programmatically call a dusk test from a php artisan command

I need to run one of my Laravel Dusk tests from an artisan command so that it processes daily. I've tried $this->call('dusk'); in my command but that runs all of dusk's tests and doesn't allow me to add a group or a filter. I need to run just 1…
Jay
  • 566
  • 6
  • 18
2
votes
1 answer

How can I take a screenshot using duncan3dc/dusk library?

I am using the duncan3dc module in laravel, Successfully importing text from the default example But I do not know how to take a screenshot, I just installed this module using Composer. $ composer requires duncan3dc/dusk. Does it mean that…
Choi yun seok
  • 309
  • 2
  • 15
2
votes
1 answer

How to work with Page Objects in laravel-dusk

I'm a new in a php and dusk, but I try to work with page object in dusk, and I'm stuck because when I try to add page object to test, phpstorm said me that "Method logInUserName not found in $this". Can someone explain to me where i'm wrong? I have…
1
vote
0 answers

How i can i run laravel dusk test cases on front-end?

My current situation is that I have a button when I click on that a single particular test case that was created using Laravel dusk should run and its log should display in a browser like Passed/Failed how much time taken etc. I tried exec() and…
Ketan Modi
  • 31
  • 3
1
vote
2 answers

Laravel Dusk says Class 'Tests\Browser\Components\...' could not be found

After I installed laravel-dusk following the official Laravel documentation and run this command: php artisan make:component CardComponentTest Then try to run immediately: php artisan dusk tests/Browser/Components/CardComponentTest.php I get this…
netdjw
  • 5,419
  • 21
  • 88
  • 162
1
2