From d36951e2d47027815c7cdbdecf7d93d647cf858a Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 7 Sep 2025 18:22:43 +0100 Subject: [PATCH 1/3] Update browser-testing.md --- browser-testing.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browser-testing.md b/browser-testing.md index 3720d8c..0032b49 100644 --- a/browser-testing.md +++ b/browser-testing.md @@ -186,6 +186,14 @@ Sometimes, elements may take time to appear on the page. By default, Pest waits pest()->browser()->timeout(10); ``` +### Configuring User Agent + +You may want to set the user agent of the browser for all of your tests, you can configure this in the `Pest.php` configuration file: + +```php +pest()->browser()->userAgent('CustomUserAgent'); +``` + ## Table of Contents ### Available Assertions From b52f40c8d3b21669936ea3504ad2048052ba01a5 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 7 Sep 2025 18:45:03 +0100 Subject: [PATCH 2/3] more xplain --- browser-testing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser-testing.md b/browser-testing.md index 0032b49..34581b5 100644 --- a/browser-testing.md +++ b/browser-testing.md @@ -188,7 +188,9 @@ pest()->browser()->timeout(10); ### Configuring User Agent -You may want to set the user agent of the browser for all of your tests, you can configure this in the `Pest.php` configuration file: +By default, the User Agent will default the Browser you're running for tests ie: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/133.0.6943.16 Safari/537.36` + +You may wish to override the User Agent of the browser for all of your tests, you can configure this in the `Pest.php` configuration file: ```php pest()->browser()->userAgent('CustomUserAgent'); From 30e3c9e5ed59acdc34ff8b0c0365744332659fb9 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 7 Sep 2025 18:47:15 +0100 Subject: [PATCH 3/3] Update browser-testing.md --- browser-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-testing.md b/browser-testing.md index 34581b5..6a15677 100644 --- a/browser-testing.md +++ b/browser-testing.md @@ -188,7 +188,7 @@ pest()->browser()->timeout(10); ### Configuring User Agent -By default, the User Agent will default the Browser you're running for tests ie: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/133.0.6943.16 Safari/537.36` +By default, the User Agent will default to the Browser you're running for tests such as: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/133.0.6943.16 Safari/537.36` You may wish to override the User Agent of the browser for all of your tests, you can configure this in the `Pest.php` configuration file: