Netbeans (6.8), Selenium and Yii

Netbeans 6.8, Selenium and Yii



[*]Install PHPunit (If it is not already installed)

[*]Install Testing_Selenium-0.4.3 (pear install Testing_Selenium-beta)

[*]install the Selenium plugin for PHP from the Netbeans development Update Center (Tools->plugins. Select Available Plugins. Search for selenium plugin for PHP. Activate and Click Install button)


To create a selenium test

  1. Create a directory for your selenium tests (selenium_tests) under testdrive folder. You may want to use the Files tab.

  2. Right click testdrive project in the Projects tab. Select New > Selenium Test Case for PHP.


  • A Select directory for testdrive dialog box pops up.

  • Browse to selenium_tests directory and open.

  • Click OK.

  • A New Selenium Test Case For PHP dialog box pops up.

  • In the File Name text box write ContactTest.

  • Click Finish.


  1. Change this code

    function setUp() {




    function testMyTestCase() {



with this

function setUp()





  function testMyTestCase()



    $this->assertTrue($this->isTextPresent("Welcome, Guest!"));






  1. Right click this file and Run.

Great job! Thank you for sharing your experience.