Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/241.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在虚拟机外使用浏览器在vagrant中运行selenium_Php_Selenium_Phpunit - Fatal编程技术网

Php 在虚拟机外使用浏览器在vagrant中运行selenium

Php 在虚拟机外使用浏览器在vagrant中运行selenium,php,selenium,phpunit,Php,Selenium,Phpunit,我试图在虚拟机中运行selenium,但是当我尝试运行时,她没有说firefox,但是我想指向虚拟机之外的浏览器。你是怎么做到的 我使用selenium server和phpunit selenium创建webdriver时,您需要指定selenium主机,它是这样的: RemoteWebDriver::create("http://{$host}:{$port}/wd/hub", $capabilities); 默认情况下,端口为4444 现在,从盒子里到任何地方都是完全不同的事情,与PHP

我试图在虚拟机中运行selenium,但是当我尝试运行时,她没有说firefox,但是我想指向虚拟机之外的浏览器。你是怎么做到的


我使用selenium server和phpunit selenium

创建webdriver时,您需要指定selenium主机,它是这样的:

RemoteWebDriver::create("http://{$host}:{$port}/wd/hub", $capabilities);
默认情况下,端口为
4444


现在,从盒子里到任何地方都是完全不同的事情,与PHP、PHPUnit或Selenium无关。

谢谢您的帮助。我更喜欢在Java中使用Selenium