Codeception / Codeception/module-webdriver

Problem possible bug Selenium WebDriver module use advanced settings proxy

未关闭
#53 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
39
派生
25
PR 合并指标
30 天内没有已合并 PR

描述

#### What are you trying to achieve?

#### What do you get instead?

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

```bash
codecept run acceptance --steps
```
> Provide test source code if related
Does not work in this setting in acceptance.suite.yml
```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]**
```php
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:

```yml
# paste suite config here
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。