Recording New Transaction Script (Scenario)

 Open the Transaction Recorder using the icon from the task bar.

Login with your Monitis credentials.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image2.png

The Scripts tab will open listing your existing transaction tests. If you have no transaction test uploaded to Monitis, this list will be empty.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image3.png

  • To edit a test previously uploaded to Cloud go to the Scripts tab, choose a test from the list and click on it to open it in a separate script tab.
  • To edit a test saved locally, open a new script tab and click Open a script from the local disk.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image4.png

To record a new transaction test click on the “+” button next to the Scripts tab. A new script tab will open.

Notice that the tab opens with recording mode enabled. Enter the URL of the site you want to monitor into the Site Base URL field (e.g. example.com).

Open in Firefox the site that you want to monitor and start navigating through and interacting with it.

Notice that the Transaction Recorder records all your steps. During the recording phase you can edit any recorded command by selecting it and editing the Command box value. You can also insert/delete commands (use the appropriate option after right clicking on a step).

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image5.png

You can also add commands manually from the drop down list.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image6.png

The description of the selected command is displayed at the bottom of the Transaction Recorder pop-up window.

There are three columns in the script table – Command, Target and Value. This table stores essential information about each step. For any element present on the web page, the Transaction Recorder maps its action with three values: command, target, and value.
For example, when typing a username in the User Name text box, the Transaction Recorder translates it as COMMAND=TYPE , TARGET=USERNAME_TEXT_BOX and VALUE=YOUR_USERNAME. For commands related to asserts, a certain value can be specified to compare to another value. For example: COMMAND=ASSERTTEXT ,TARGET=LABEL and VALUE=SOMETHINGTOCOMPARE

The Transaction Recorder provides enough functionality in terms of identifying the target. For instance, the client can locate or identify the target using DOM, ID, Name, XPath etc. You also may find it useful to try Firefox extensions like DOM Inspector or XPath Viewer to get information about the XPath or DOM information of the GUI element under test.

 

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image7.png

Use the Target Selector button to select the target on web page. Click the button, and then click an element on the web page to select it. To change the selection, click some other element. To cancel the selection, click the button again.

After you have selected the element, you can choose between ID, Name, or XPath to be the element target as needed, by selecting the value from the Target combo box.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image8.png

There are also custom developed commands: if, else and for that are not in the list. You should insert them manually in the script.

If there is a need to change the flow of a transaction script by including some condition, then you can use the “if/else” statement. Condition of the “if”, “else” and “for” clauses is displayed in the Target column. When the “else” clause is not needed you should close the “if” clause using the “endif” command.
If you’re using the “else” command then you should close it with the “endElse” command.
Also please note that the “if/else” statement can be used only once per script.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\FINAL\With New Screenshots\IMAGES_RECORDER_FINALLL\IMAGES_RECORDER\image9.png
Use the “for” statement to repeat the same commands multiple times.

Note: You can find the most commonly used commands with their descriptions here:

To view the recorded flow click Play.

To upload a script to Monitis cloud click on the Save Your Script on The Cloud button. Note that the test name should be unique within the account’s list of existing Transaction Monitors.

To ensure that the new recording has been successfully added look it up in the Scripts tab.

 

Running the Script in Transaction Monitor

In your Monitis dashboard go to Monitors -> End User Monitors -> Synthetic Transaction.

In the Add Transaction Monitor wizard select the script you want to run on this monitor and click Next.

C:\Users\monitis_user\Google Drive\MY DOCUMENTS_JUNE 2016\0000000_AAAA_TR_Recorder\Changes Accepted\media\media\image10.png

 

On the next screen select the locations to run the script from as well as running frequency.

Click Add when done to add the monitor.