Web Recorder

Twist's Web Recorder allows testing of web-based applications to be automated using record and playback options. During the recording process, the recorder creates Selenium scripts for the actions performed in the browser.

It may be noted that currently Twist supports only Firefox during the Recording mode but supports both IE and Firefox in playback mode. Browser mode can be changed in <source_folder>/twist.properties (The properties file can be opened from Project explorer view).

Working with the Web Recorder

Prerequisites for recording:

  • The Twist project should have been created with 'Selenium' driver in the Advanced options.
  • Note that Firefox 2.x and above should be installed as it is required to perform recording.
  • that all the preceding scenario elements (including any contexts, business workflow fixtures, business workflow steps and business rules tables) to this workflow step be implemented and error-free.

  1. Let us consider a shopping cart scenario for books, which will search for a particular book and adds that book to the shopping cart
  2. Create a Business Workflow. Create the underlying fixture by invoking Quick Fix or Ctrl+1 on the Workflow.
  3. Create the workflow step that you want to record. Web Recorder Screen1

    In this example, navigate to the first step search for "books" written by "Agatha Christie" and press the Quick Fix shortcut key (Ctrl + 1).

  4. Select the Record as method in class using Selenium. This will invoke the recorder and open up the Twist browser for recording.
  5. Enter the corresponding URL to load the Books Shopping Cart application
  6. Use the option Search to find book "Five Little Pigs" and add the book found to the shopping cart.
  7. Twist Web Recorder captures all user interactions in the Browser and records them as Selenium scripts.
  8. Click on the Done button to exit from the recorder, when done. Web Recorder Screen2
  9. Note that the actions captured during recording are present in the underlying code. Observe that the object ids are stored as constants in the methods.
  10. Web Recorder Screen3