Child pages
  • Setting Up Selenium for Web Client UI Testing

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This chapter provides information on how to set up Selenium for visual testing the Servoy solutions in Web Client. Selenium IDE will record and playback the user clicks on the UI.

...

  • When using sendKeys, also add a fireEvent with value blur on the target for the sendKeys, otherwise the sendKeys is not applied
  • When recording, Selenium inserts selectWindow commands. Most of these can be removed. They are only needed when the test needs to switch to another tab or to a different dialog (or back to the main form from a dialog)
  • By default Selenium does not handle Ajax events very well when recording. It inserts simple click events, but those clicks usually result in an Ajax call to the server. Use the waitForWicketAjax command to wait the result from the server before executing the next command. Note that waitForWicketAjax fails if there are multiple Ajax call to the server or if the call results in closing the JSWindow ( The command would not find the current window and generate an error ).
  • When waitForWicketAjax cannot be used wait for a specific element to be loaded instead.
  • Use the xxxAndWait command when the action causes a new page to load. Selenium will wait until the page is loaded.
  • Before selecting a value from a valuelist (combobox/typehead) use waitForSelectOptions  to wait for the value to be loaded on the list.
  • When testing resizable components based on JQuery UI Resizable execute a mouseOver command BEFORE the dragAndDrop command. This is needed to bring the resizable component in the right state for Drag 'n' Drop to work. See the comment in JQuery UI's own test code: https://github.com/jquery/jquery-ui/blob/master/tests/unit/resizable/resizable_test_helpers.js

Playback - Running the Script

...

Tip: for more detailed documentation and video tutorials user this link: http://jroller.com/selenium/

 

...

...

 

...