Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Problem possible bug Selenium WebDriver module use advanced settings proxy

未關閉
#53 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

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

研究方向

從 vendor/codeception/codeception/src/Codeception/Module/WebDriver.php 的 _initialize() 附近(第 293-295 行)開始,然後將其與 acceptance.suite.yml 中的代理設定進行比較。使用提供的設定執行 codecept run acceptance --steps,並驗證已設定的 noProxy、httpProxy 和 sslProxy 值是否作為 Selenium 代理 capabilities 傳遞。

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

描述

What are you trying to achieve?
What do you get instead?

Provide console output if related. Use -vvv mode for more details.

codecept run acceptance --steps

Provide test source code if related
Does not work in this setting in acceptance.suite.yml

class_name: AcceptanceTester
modules:
    enabled:
        - WebDriver:
            url: 'http://myproject.dev'
            browser: firefox
            window_size: maximize
            capabilities:
                proxyType: 'manual'
                noProxy: 'localhost, 127.0.0.1, *.dev'
                httpProxy: '10.255.100.1:3128'
                sslProxy: '10.255.100.1:3128'
        - \Helper\Acceptance

#File vendor/codeception/codeception/src/Codeception/Module/WebDriver.php
Method _initialize() line 293-295
For my solution neccessary alter manual for settings use no proxy for in runtime browser.
Sets Selenium2 desired capabilities. Should be a key-value array proxy
https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#proxy-json-object

My problem was to inform the browser the list of url no proxy in capabilities [noProxy]

if ($proxy = $this->getProxy()) {
            $this->capabilities[WebDriverCapabilityType::PROXY] = $proxy;
}
#My solution
if ($proxy = $this->getProxy()) {
            $this->capabilities[WebDriverCapabilityType::PROXY] = array(
                    'proxyType' => 'manual',
                    'noProxy' => 'localhost, 127.0.0.1, *.dev ',
                    'httpProxy' => '10.255.100.1:3128',
                    'sslProxy' => '10.255.100.1:3128'
                );
        }
Details
  • Codeception version: 2.2.7
  • PHP Version: 7.0
  • Operating System: Debian 8
  • Installation type: Phar || Composer
  • List of installed packages (composer show)
  • Suite configuration:
# paste suite config here
主要語言
PHP
星號
39
分支
25
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

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

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Codeception/module-webdriver 的其他 Issue

查看 Codeception/module-webdriver 的全部 Issue

相似的 Issue

更多 PHP Issue

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

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