Tuesday, March 13, 2007

Setting up PHP environment for Selenium

If you have gone through configuring Selenium in Windows system by Setting up Selenium RC server in Windows and Setting up PHP in Windows using Abyss server, next thing you need to setup is the Selenium PHP client. Let me show you the steps I've gone through to accomplish this:

1. Open up the console with all administrative privileges especially in Vista
2. Go to the directory where PHP is installed
3. Execute command: php PEAR/go-pear.phar
4. Follow the instructions, and ignore the additional offerings to configure it
5. Install PHPUnit by:
pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit

6. Download Selenium PHP PEAR extension and place into your PHP directory
7. Run: pear install Testing_Selenium-0.4.2.tar
8. Download the sample GoogleTest and assuming you put it in C:\Tests folder
9. Now run: phpunit --verbose GoogleTest C:/Tests/GoogleTest.php
10. Remember the class name GoogleTest must be the same as the class name defined in the GoogleTest.php

No comments: