Codeception / Codeception/module-webdriver

Can't change user agent for firefox/geckodriver

未關閉
#122 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
PHP
星號
39
分支
25
PR 合併指標
30 天內沒有已合併 PR

描述

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"
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

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.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
php
領域
testing
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。