Codeception / Codeception/module-webdriver
Can't change user agent for firefox/geckodriver
- Dominant language
- PHP
- Stars
- 39
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to set a specific User-Agent in geckodriver for the sake of my tests. But I can't find how to properly set that option in yml settings.
Is there any way to change for firefox the user agent?
* Codeception version: 5.1
* PHP Version: 8.2
* Operating System: Ubuntu
* Installation type: Composer
* Suite configuration:
```yml
wpfirefox:
modules:
enabled:
config:
WPWebDriver:
url: '%TEST_LOCAL_WP_URL%'
adminUsername: '%TEST_WP_ADMIN_USERNAME%'
adminPassword: '%TEST_WP_ADMIN_PASSWORD%'
adminPath: '%TEST_WP_ADMIN_PATH%'
browser: firefox
path: ''
window_size: 1024x768
capabilities:
moz:firefoxOptions:
args: ["-user-agent=wp-browser", "-headless"]
prefs:
intl.accept_languages: "fr-FR"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the WPWebDriver suite configuration and its capabilities entry, focusing on the moz:firefoxOptions args and prefs shown in the issue. Reproduce the configuration with Firefox and determine whether the requested user agent is applied; done means the test browser reports the configured User-Agent while retaining the existing language and headless settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100