Child pages
  • Setting Up Selenium for Web Client UI Testing

Versions Compared

Key

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

...

  • Save and restart application server.

Setup

...

Selenium description

Main window description

  • The left part of the main window contains the tree structure that represents the test-suite. The right side displays the details of a selected node. (In case you don't see the details view, you can switch it on with the View!Details menu option.) At the bottom of the main window you'll see the terminal output area, which displays stan-dard messages and communications in between your test-suite and the client applica-tion you are testing.
  • The basic structure of a test-suite and thus the child nodes of theTest-suite root node is fixed. An arbitrary number of Test-set, Test-case or Test nodes are followed by the Procedures, Extras and Windows and components nodes. The Procedures node holds Packages and Procedures.

Starting the Application

  • If QF-Test Selenium is configured – JRE instrumentation is done, jnlp path is added, select Setup node and hit Enter
  • (When qf-test is run the first time, there is a check - "Start automatically")

Our first step will be to examine the "Setup" node:

  • Set variable: client='client'
  • Wiki Markup
    Start SUT client: javaws \[$(client)\]\-      starts the application  for the client you will be testing, called the System Under Test (SUT).
  • Wiki Markup
    Wait for client to connect \[$(client)\]\-      waits until the new  Java Virtual Machine, in which your SUT will run, binds itself to  QF-Test.
  • If the jnlp path was correct, the solution will open in SmartClient and the QF-Test's buttons bar a couple of buttons will become enabled (like: "Start Recording" – red circle, "Recording checks" – green check ...)
  • In the first field, labeled "Client," is an ambiguous name for the SUT application. You can give the SUT any name you wish, but the same name will be used as a reference to the SUT in other nodes. In other words, this name must be used consistently.

Context Help

While working with various nodes in QF-Test you may, for example, require some asistance in remembering what purpose they are used for. To serve this need, QF-Test comes with context-sensitive help, driven simply by your mouse. Move the mouse pointer over an element you would like to have assistance with, then click the right mouse-button. In the now appearing popup menu, you'll see an entry labeled "What's this?" By selecting this option from the popup menu, the appropriate section in the user's

...

  • , Servoy web client also, then you can run the solution on web client with Firefox browser.
  • When the application is running on browser, then the Selenium can be started using <CTRL + ALT + S> or going to Firefox-> Web Developer-> Selenium IDE.

Recording events

  • Click record button
  • Go to SCWC, do the actions needed, typing data/ adding records/ delete
  • When done go to qf-test selenium and hit "Stop recording" button
  • A sequence is created which can be renamed properly-select seq.-hit F2 key-give it a name
  • Multiple sequences can be packed in Procedures by multiple selecting sequences, right click, transform node into procedure

Recording checks

  • Click record button
  • Click green – "check" button
  • In SC left click the fields that you want checked in the desired order
  • When finished, go back to qf-test main page and hit "Stop" recording-square button, the sequence was recorded
  • Multiple sequences can be packed in procedures by multiple selecting sequences, right click, "Transform node into"  - "Procedure", which can be renamed properly-select proc.-hit F2 key-give it a name
  • Procedures can be directly recorded by hitting "Record" button and then
  • saved using <CTRL+S>.

Playback - Running the script

  • If only the Setup part of the script is tested, then select Setup node of the tree and hit "Enter"
  • If only a sequence is tested, or multiple by shift-selecting, then select that sequence and hit "Enter"
  • If all the script is tested then select Extras node, and hit "Enter"
  • TIP: for easier following of the test run, add a default delay: go to qf-test->main menu-> edit->options->replay->delays -> default delays add something like 350 in the before and after fields.Tip:

...