I am trying to get Mink working on Centos/Apache, but it cannot connect. I have tried with Selenium2Driver, ZombieDriver and last Sahi but I always get a different error.
Right now with Sahi:
require __DIR__ . '/vendor/autoload.php';
$driver = new \Behat\Mink\Driver\SahiDriver('firefox');
$session = new \Behat\Mink\Session($driver);
$session->start();
$session->visit('http://google.it');
echo $session->getStatusCode();
and generate this error:
Fatal error: Uncaught exception 'Buzz\Exception\RequestException' with message 'couldn't connect to host' in /var/www/html/Test/vendor/kriswallsmith/buzz/lib/Buzz/Client/Curl.php:29
Stack trace: #0 /var/www/html/Test/vendor/kriswallsmith/buzz/lib/Buzz/Browser.php(130):
Buzz\Client\Curl->send(Object(Buzz\Message\Request), Object(Buzz\Message\Response)) #1 /var/www/html/Test/vendor/kriswallsmith/buzz/lib/Buzz/Browser.php(82):
Buzz\Browser->send(Object(Buzz\Message\Request)) #2 /var/www/html/Test/vendor/kriswallsmith/buzz/lib/Buzz/Browser.php(36):
Buzz\Browser->call('http://localhos...', 'POST', Array, '') #3 /var/www/html/Test/vendor/behat/sahi-client/src/Connection.php(268):
Buzz\Browser->post('http://localhos...', Array, '') #4 /var/www/html/Test/vendor/behat/sahi-client/src/Connection.php(150):
Behat\SahiClient\Connection->post('http://localhos...') #5 /var/www/html/Test/vendor/behat/sahi-client/src/Client.php( in /var/www/html/Test/vendor/kriswallsmith/buzz/lib/Buzz/Client/Curl.php on line 29
I have installed with composer: behat/behat behat/mink behat/mink-sahi-driver behat/sahi-client
Why it cannot connect?