You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dusk.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ To get started, you should install [Google Chrome](https://www.google.com/chrome
64
64
composer require laravel/dusk --dev
65
65
```
66
66
67
-
> [!WARNING]
67
+
> [!WARNING]
68
68
> If you are manually registering Dusk's service provider, you should **never** register it in your production environment, as doing so could lead to arbitrary users being able to authenticate with your application.
69
69
70
70
After installing the Dusk package, execute the `dusk:install` Artisan command. The `dusk:install` command will create a `tests/Browser` directory, an example Dusk test, and install the Chrome Driver binary for your operating system:
@@ -75,7 +75,7 @@ php artisan dusk:install
75
75
76
76
Next, set the `APP_URL` environment variable in your application's `.env` file. This value should match the URL you use to access your application in a browser.
77
77
78
-
> [!NOTE]
78
+
> [!NOTE]
79
79
> If you are using [Laravel Sail](/docs/{{version}}/sail) to manage your local development environment, please also consult the Sail documentation on [configuring and running Dusk tests](/docs/{{version}}/sail#laravel-dusk).
> Dusk requires the `chromedriver` binaries to be executable. If you're having problems running Dusk, you should ensure the binaries are executable using the following command: `chmod -R 0755 vendor/laravel/dusk/bin/`.
102
102
103
103
<aname="using-other-browsers"></a>
@@ -181,7 +181,7 @@ class ExampleTest extends DuskTestCase
181
181
}
182
182
```
183
183
184
-
> [!WARNING]
184
+
> [!WARNING]
185
185
> SQLite in-memory databases may not be used when executing Dusk tests. Since the browser executes within its own process, it will not be able to access the in-memory databases of other processes.
186
186
187
187
<aname="reset-truncation"></a>
@@ -287,7 +287,7 @@ The `dusk` command accepts any argument that is normally accepted by the Pest /
287
287
php artisan dusk --group=foo
288
288
```
289
289
290
-
> [!NOTE]
290
+
> [!NOTE]
291
291
> If you are using [Laravel Sail](/docs/{{version}}/sail) to manage your local development environment, please consult the Sail documentation on [configuring and running Dusk tests](/docs/{{version}}/sail#laravel-dusk).
292
292
293
293
<aname="manually-starting-chromedriver"></a>
@@ -506,7 +506,7 @@ Often, you will be testing pages that require authentication. You can use Dusk's
506
506
->visit('/home');
507
507
});
508
508
509
-
> [!WARNING]
509
+
> [!WARNING]
510
510
> After using the `loginAs` method, the user session will be maintained for all tests within the file.
511
511
512
512
<aname="cookies"></a>
@@ -707,7 +707,7 @@ The `attach` method may be used to attach a file to a `file` input element. Like
> The attach function requires the `Zip` PHP extension to be installed and enabled on your server.
712
712
713
713
<aname="pressing-buttons"></a>
@@ -738,7 +738,7 @@ You may use the `seeLink` method to determine if a link with the given display t
738
738
// ...
739
739
}
740
740
741
-
> [!WARNING]
741
+
> [!WARNING]
742
742
> These methods interact with jQuery. If jQuery is not available on the page, Dusk will automatically inject it into the page so it is available for the test's duration.
743
743
744
744
<aname="using-the-keyboard"></a>
@@ -752,7 +752,7 @@ Another valuable use case for the `keys` method is sending a "keyboard shortcut"
752
752
753
753
$browser->keys('.app', ['{command}', 'j']);
754
754
755
-
> [!NOTE]
755
+
> [!NOTE]
756
756
> All modifier keys such as `{command}` are wrapped in `{}` characters, and match the constants defined in the `Facebook\WebDriver\WebDriverKeys` class, which can be [found on GitHub](https://github.com/php-webdriver/php-webdriver/blob/master/lib/WebDriverKeys.php).
757
757
758
758
<aname="fluent-keyboard-interactions"></a>
@@ -914,9 +914,9 @@ If you need to interact with elements within an iframe, you may use the `withinF
914
914
915
915
$browser->withinFrame('#credit-card-details', function ($browser) {
@@ -2092,7 +2092,7 @@ class ExampleTest extends DuskTestCase
2092
2092
<aname="continuous-integration"></a>
2093
2093
## Continuous Integration
2094
2094
2095
-
> [!WARNING]
2095
+
> [!WARNING]
2096
2096
> Most Dusk continuous integration configurations expect your Laravel application to be served using the built-in PHP development server on port 8000. Therefore, before continuing, you should ensure that your continuous integration environment has an `APP_URL` environment variable value of `http://127.0.0.1:8000`.
0 commit comments