Skip to main content

Record & Playback

The Record & Playback feature facilitates the process of mapping the steps of an existing UML diagram with the real steps of an application. It is a helper in the process of model and map, which you should use with the rest of H-TEST tools.

Selenium IDE is an extension of Chrome or Firefox that allows you to record, edit and execute tests, also known as Selenium Recorder.

Installation

Install Selenium IDE from either the Chrome or Firefox web store. Selenium IDE records multiple locators for each element it interacts with. Through the use of the run command, you can re-use one test case insidie of another.

Upon launching the IDE you will be presented with a welcome dialog.

This will give you quick access to the following options:

Selenium1.jpg

  • Record a new test in a new project.
  • Open an existing project.
  • Create a new project.
  • Close the IDE.

If this is your first time using the IDE (or you are starting a new project), then select the first option. After completing these settings, a new browser window will open

Selenium2.jpg

load the base URL

Selenium3.jpg

and start recording

Selenium4.jpg

Saving your work

To save everything you've just done in the IDE, click the save icon in the top-right corner of the IDE.

Selenium5.jpg


It will prompt you to for a location and name of where to save the project. The end result is a single file with a .side extension.

Selenium6.jpg

You can import Selenium IDE record saved file to in the Tast Web.

On the first Selenium Record version you can only import created steps to the previously. Created diagram must contains two adapters Objects User and GUI adaptor. Every new command imported from selenium Record file will be converted to the Tast function and creates and insert message after last diagram message if it proceeds. The import button for Selenium Record functionality you can find it in the Tast Web top right corner. For the start import you have to select generated record.side file, Domain, Project, Folder and Diagram.

The next Selenium Record version will permit import generated record.side file without previously created user diagram for the first time.

https://www.seleniumhq.org/selenium-ide/docs/en/introduction/getting-started/

input.png

Instructions for Using Selenium IDE in H-TEST

In Selenium IDE

image.png

 

image.png

  • Open Selenium IDE, to create a TS:

Record&Playback2.png

  • Set the url of the initial page you want to start recording and press the REC button to start recording

Record&Playback3.png

Record&Playback4.png

Record&Playback5.png

  • Start the navigation. You can Pause and Stop at anytime. Your navigation is recording in the IDE while you are browsing the pages and options.

Record&Playback6.png

  • Stop and Save the TS: 

Record&Playback7.png

In H-TEST

  • Go to your browser and click on recording button to start the record of the navigation of your diagram (as described in the section: In Selenium IDE).
  • Once you have recorded your navigation, you are ready to import the recorded navigation in H-TEST. Go to H-TEST and in Modeling and select the button to import the Selenium IDE navigation.
    1. Click in the button to import the file with the recorded code from Selenium IDE.
    2. Select the file with your navigation recorded and drag and drop.
    3. Accept to create the diagram.

Record&Playback8_blue.png

Record&Playback9_blue.png

  • It appears an advice in orange color, informing that the diagram has imported, and it's necessary to save it. The records in Selenium has imported in H-TEST. Thus, you can save the diagram.


I NEED AN IMAGE THAT DOES NOT GIVE AN ERROR

Error_blue.png


  • Now, you can launch the diagram following the normal procedure.
  • Additionally, please consider the following behavior of the application:
    • If the diagram does not exist, a new one is created.
    • If the User or GUI object does not exist, a new one is created. When a new GUI object is created, it is created with the Selenium IDE URL and with the Microsoft Edge browser by default.
    • In case of already existing adapter GUI created in the diagram, no other is created and the URL of this is not updated. Selenium IDE commands are simply mapped to this.
    • The messages are mapped to the first GUI HTML adaptor found. If none exists, it is created as the last object in the diagram.
    • The messages are added after the existing messages.
    • It is compatible with already created diagrams that have different objects and messages.

 If the same messages are imported again, they will be added after the existing ones in the diagram.