Here are a few key points about using PHPUnit for Selenium testing:
- PHPUnit provides a SeleniumTestCase class that allows you to write Selenium tests that extend it. This gives you access to Selenium commands like open(), type(), click(), assertTitle(), etc.
- You'll need to have Selenium Server and a supported browser (Firefox, Chrome, IE) installed to run the tests.
- Tests using SeleniumTestCase are more like integration/acceptance tests that simulate user interactions and verify page content rather than isolated unit tests.
- Common things to test include page titles, form submissions, link navigation, page content validation after actions.
- Selenium IDE can be used to record tests that can be exported to PHPUnit
Related topics: