If you need to process specific web page information, such as JavaScript error and status codes or informational messages, you can enable the browser’s DevTools  Console monitoring. By default, Dotcom-Monitor reports don’t include messages from the Console log. 

To enable Console messages monitoring:

  1. Right-click the script line, or step, after which the Console messages need to be monitored.
  2. From the context menu select Console > Output Filters
  3. Select one from the available output options:
    • Raise Error – generates an error response if a message in the Console satisfies the filtering criteria.  
    • Log – adds the Console messages to the device report if the filtering criteria are met.
    • Skip – excludes the messages from processing. The messages that satisfy the filtering criteria will be ignored in Console monitoring.
    • Clear – adds the point that clears previously set filters.
  4. Specify the filtering criteria:
    • Message type – specifies the message type that the selected output filter will be applied to. Select All to apply the filter to any type of Console messages.   
    • Message mask – specifies the mask of a message text. Output filter will be applied only to the messages which contain a specified mask.  
    • URL mask – defines the mask of the web element URL related to the message. If the element URL contains the mask, the message will be processed while monitoring according to the filter.
    • Message source – defines the source that caused the message to get logged to the Console. 

Message mask and URL mask can be converted to Context parameters.

The Console Output Filters are applied according to their position in the script. So, in the case of any contradiction between the Output Filters, the filter that appears last in the script has the highest priority.

Example

In the monitoring script example above, all Console informational messages will be skipped beginning after Step 3 until Step 5, while the script executes.  Beginning at Step 5, all types of Console messages, including informational messages, will be logged to the device report.

How to find logged messages in the monitoring results

Once the Log output filter has been applied to the monitoring script, the Console messages are added to the Online Report log. To find the messages, go to Online Report > Log tab to view the details on session steps. The messages will be listed in a step-detailed view. You can also view messages on the device’s Waterfall Chart.

Example

In the script provided below, the Log output filter is added at the beginning of Step 1.  This means that all Console messages will be recorded to the session log.