Install Selenium IDE

  • Download and install the latest Selenium IDE Firefox extension (firefox plugin) From http://selenium-ide.openqa.org/ The bvt uses Firefox 2 to run the tests.
  • After adding the plugin you will see a Selenium IDE option under the Firefox Tools menu. Select Selenium IDE to open it up.
  • Select Options... under the Options menu to setup the options we will want to use.
  • On the Options dialog select Enable UI-Element (experimental, requires IDE restart) and press the Ok button.
  • Close the Selenium IDE.

To run current Selenium Tests

  • Checkout the tests from svn:
  • svn co https://www.projectzero.org/svn/zero/trunk/BVT/zero.appbuilder.ui.bvt
  • Start the App Builder on http://localhost:8070/
  • Open Firefox and go to http://localhost:8070/ Note you will want to remove all apps from the App Builder, and have the default directory pointing to an empty directory before starting the tests.
  • Select Selenium IDE under the Tools menu to start Selenium.
  • From the Selenium IDE File menu select Open Test Suite... NOTE: You don't want to select Open... we want to edit the Test Suites.
  • You may need to set http://localhost:8070/ in the Base URL field, if it is not there.
  • From the Select Test Suite dialog navigate to the selenium tests you checked out from svn. The selenium tests are under the selenium_tests folder for example: C:\updateSeleniumTests\zero.appbuilder.ui.bvt\selenium_tests\ABT1TestSuite.html
  • If you double click the first testcase *ABT1TestOpen you will see this:
    SelImg1b.gif
    Selenium IDE
  • To run the entire test suite click this RunTestSuite.gif
  • To run an individual test, double click the test to select it, and then click this RunTest.gif
  • To run any line from a test double click on that line.

To update current Selenium Tests

  • You may hit an error because an xpath has changed and a button or field is not found (like this)
    SelError1.gif
    Error button not found

  • To fix this, you need to step back to line which is failing, then select the Record icon (Red dot in the upper right corner) then click the button which could not be found (in this case the Yes button. Next select the Record icon again to stop recording, and you will want to delete the old line which was failing and update the new line added when the recording was done. From the Target dropdown select the XPATH:Position as seen here.
    SelFix1.gif
    Add Xpath for the button

* Use ctrl-s to save the changes to the testcase.

* After making the updates you should re-run the entire test suite to be sure things are working as expected, sometimes the order of execution effects the results of the Selenium tests.

-- edchat - 15 Oct 2008

  Attachment Action Size Date Who Comment
gif RunTest.gif props, move 1.2 K 15 Oct 2008 - 14:25 edchat  
gif RunTestSuite.gif props, move 1.3 K 15 Oct 2008 - 14:24 edchat  
gif SelError1.gif props, move 103.0 K 15 Oct 2008 - 14:55 edchat  
gif SelFix1.gif props, move 98.0 K 15 Oct 2008 - 15:32 edchat  
gif SelImg1.gif props, move 85.7 K 15 Oct 2008 - 14:17 edchat Selenium IDE image 1
gif SelImg1b.gif props, move 91.2 K 15 Oct 2008 - 15:57 edchat  
r1 - 15 Oct 2008 - 16:33:35 - edchat
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site