Highlight Method

Class

DomElement.

Action

Highlights a DOM element.

Availability

This functionality is supported only if you are using the Open Agent.

Syntax

domelement.Highlight(foregroundColor, backgroundColor)
Variable Description
foregroundColor Foreground color for highlighted DOM elements. STRING.
backgroundColor Background color for highlighted DOM elements. STRING.

Example

// helper method that checks
// if a property has a specific value
void CheckProperty(WINDOW domElement, STRING strName, STRING strValue)
  STRING strActualValue = domElement.GetProperty(strName)
  // value as expected -> highlight the element green
  if (strActualValue == strValue)
    domElement.Highlight("#000000", "#00FF00")
  // value different -> highlight the element red
  else
    domElement.Highlight("#000000", "#FF0000")