Open GoogleCodeExporter opened 9 years ago
I changed my xampp server port to 8080 instead of 80. So when I change above
code to the following code
<?php
require_once "phpwebdriver/WebDriver.php";
$webdriver = new WebDriver("localhost", "8080");
$webdriver->connect("firefox");
$webdriver->get("http://google.com");
$element = $webdriver->findElementBy(LocatorStrategy::name, "q");
if ($element) {
$element->sendKeys(array("php webdriver" ) );
$element->submit();
}
$webdriver->close();
?>
then I face the following error.
Notice: Trying to get property of non-object in
C:\xampp\htdocs\PHPSELENIUM\phpwebdriver\WebDriver.php on line 60
Original comment by 110165...@umt.edu.pk
on 13 Jan 2015 at 4:36
Sounds like you are confusing how to connect the PHP webdriver? You don't need
to use XAMPP or any web server for this library. Just PHP binary whether it's
standalone or installed with XAMP or other web server package.
You do however need to start up the Selenium Server JAR (i.e. for
RemoteWebDriver, or start it up for Selenium Grid mode of a hub and a node).
Then you connect to the Selenium Server that was started. By default it is port
4444 and you run it on the same localhost. However you can run it on a remote
machine or use a different port with Selenium Server startup command line (or
config file) options.
Original comment by manga...@gmail.com
on 27 Apr 2015 at 3:37
Original issue reported on code.google.com by
110165...@umt.edu.pk
on 13 Jan 2015 at 4:28