How to setup Selenium (WebDriver and Server) with PHP bindings
To get this running locally, follow the instructions here:
https://github.com/facebook/php-webdriver#getting-started
Here is a sample PHP webdriver script that you can use. It will open firefox, take you to google's page and submit a search query:
// you'll need to modify this path so it points to the composer autoloader require_once __DIR__ . '/vendor/autoload.php'; /** * since I'm running the selenium jar locally, this is all I need. * I just run it in the background and my php scripts connect to it and * the tests */ $host = 'http://localhost:4444/wd/hub'; $driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox()); $driver->get('http://google.com'); $element = $driver->findElement(WebDriverBy::name('q')); $element->sendKeys('Cheese'); $element->submit();
Is this the sort of detail you're looking for?
If you a visual learner like me, this
Youtube Video
Selenium WebDriver set up with PHP - Selenium PHP traininig
will help you do that. :)