Skip to content

Commit

Permalink
Merge pull request Codeception#2176 from jdq22/add-http-proxy-vars
Browse files Browse the repository at this point in the history
Add http_proxy and http_proxy_port vars to config
  • Loading branch information
DavertMik committed Jul 29, 2015
2 parents a8fb532 81ee3a7 commit 43f310b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Codeception/Module/WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 143,9 @@ class WebDriver extends CodeceptionModule implements
'window_size' => false,
'capabilities' => [],
'connection_timeout' => null,
'request_timeout' => null
'request_timeout' => null,
'http_proxy' => null,
'http_proxy_port' => null
];

protected $wd_host;
Expand All @@ -152,6 154,8 @@ class WebDriver extends CodeceptionModule implements
protected $request_timeout_in_ms;
protected $test;
protected $sessionSnapshots = [];
protected $http_proxy;
protected $http_proxy_port;

/**
* @var RemoteWebDriver
Expand All @@ -167,7 171,7 @@ public function _initialize()
$this->request_timeout_in_ms = $this->config['request_timeout'] * 1000;
$this->loadFirefoxProfile();
try {
$this->webDriver = RemoteWebDriver::create($this->wd_host, $this->capabilities, $this->connection_timeout_in_ms, $this->request_timeout_in_ms);
$this->webDriver = RemoteWebDriver::create($this->wd_host, $this->capabilities, $this->connection_timeout_in_ms, $this->request_timeout_in_ms, $this->http_proxy, $this->http_proxy_port);
} catch (WebDriverCurlException $e) {
throw new ConnectionException($e->getMessage()."\n \nPlease make sure that Selenium Server or PhantomJS is running.");
}
Expand Down

0 comments on commit 43f310b

Please sign in to comment.