dongshilve4392 2015-09-23 10:50
浏览 29

Mink + Driver无法连接到主机

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?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?