PHP Webdriver - 目标页面无法在浏览器中加载

New to Selenium 2. Here's the issue: each time I run a test, the browser opens but refuses to load URLs. I simply get a blank page. Here's an example using Łukasz Kolczyński's bindings:

require_once "phpwebdriver/WebDriver.php";

$webdriver = new WebDriver("localhost", "4444");
$webdriver->connect("chrome");                            
$webdriver->get("http://google.com");
$element = $webdriver->findElementBy(LocatorStrategy::name, "q");
if ($element) {
    $element->sendKeys(array("php webdriver" ) );
    $element->submit();
}

$webdriver->close();

I simply get "data:text/html;charset=utf-8," in the address bar. Then the script closes.

I'm sure I'm doing something wrong. Any help would be greatly appreciated.

Notes: I'm currently running chromedriver, chrome 28, php 5.4.9, and OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

After 24 hours of frustration, I concluded that the unofficial php bindings are not worth the trouble. Judging by some of the feedback on Github, I think this is a common complaint.

I decided to try one of the official APIs. The Python implementation works great. I found it was faster to learn some Python and write my tests in a new language than troubleshoot the PHP bindings.

Now that I've trashed the php code, I'm sure I'll learn that I missed something obvious. :)

I had the same problem. I could not get this to work and finally opted to use the facebook version of web driver.

Just make sure you are using the latest version of php otherwise it will not work as desired.

Here are the links: Facebook git location: https://github.com/facebook/php-webdriver