Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Problem possible bug Selenium WebDriver module use advanced settings proxy

Đang mở
#53 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với vendor/codeception/codeception/src/Codeception/Module/WebDriver.php, quanh _initialize() ở các dòng 293-295, sau đó so sánh với các thiết lập proxy trong acceptance.suite.yml. Chạy codecept run acceptance --steps bằng cấu hình được cung cấp và xác minh rằng các giá trị noProxy, httpProxy và sslProxy đã cấu hình được truyền dưới dạng Selenium proxy capabilities.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
PHP
Star
39
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Codeception/module-webdriver

Tất cả issue của Codeception/module-webdriver

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.