I'm using facebook/php-webdriver when I'm trying to connect to any website with a proxy using the following code :
$driver = RemoteWebDriver::create($host, $capabilities);
try{
$driver->navigate()->to("http://www.example.com/");
} catch (Exception $e) {
echo $e->getMessage();
}
It will take time because the proxy is sometimes slow then return the following error :
Curl error thrown for http POST to /session/c189e325-9057-489c-b2de-93c95cdb1cc4/url with params: {"url":"http://www.live.com/"}
Operation timed out after 30001 milliseconds with 0 out of -1 bytes received
Question: It's possible to increase the curl timedout delay 30001 milliseconds ?
RemoteWebDriver::create()
supports specifying the connection and request timeout as the third and fourth arguments, e.g.
$driver = RemoteWebDriver::create(
$host,
$capabilities,
60 * 1000, // Connection timeout in miliseconds
60 * 1000 // Request timeout in miliseconds
);
See: https://github.com/php-webdriver/php-webdriver/blob/1.9.0/lib/Remote/RemoteWebDriver.php#L88
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With