Any one know how to use Selenium 2 with Phpunit? Are there any Selenium 2 samples in PHP?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Quick update: phpunit does now support Selenium 2
At the time of writing, PHPUnit does not support Selenium 2.
php-webdriver from facebook allows the complete WebDriver API to be called from PHP in an elegant way. To quote:
It is used by starting up the Selenium 2 server, which provides the interface at
localhost:4444/wd/hub.then running the PHP test code, which calls that interface. For example:
The WebDriver API is mapped to PHP methods, compare calling
clickonelementin the example with the element/click API call in the documentation.The test code can then be wrapped in regular phpUnit tests.
This is not native phpUnit support, but it’s a quite robust approach.