Options Property

Applies to TestComplete 14.72, last modified on April 22, 2021

Description

The XMLCheckpoint.Options property provides access to the comparison settings of the appropriate XMLCheckpoint project element.

Declaration

XMLCheckpointObj.Options

Read-Only Property An XMLCheckpointOptions object
XMLCheckpointObj An expression, variable or parameter that specifies a reference to an XMLCheckpoint object

Applies To

The property is applied to the following object:

Property Value

An XMLCheckpointOptions object that holds the comparison settings of the XMLCheckpoint project element.

Remarks

The XMLCheckpoint object provides access to a copy of the element’s data. Changes made to the comparison settings via the Options property will not be stored in the element and will not be displayed in the XMLCheckpoint Element editor.

Example

The following example demonstrates how to use the Options property to obtain XML Checkpoint comparison settings in a test.

JavaScript, JScript

function XMLCheckpointOptions()
{

  var XMLCheckpoint, XMLOptions;
  // Obtains the XMLCheckpoint object from script.
  XMLCheckpoint = XML.MyXMLCheckpoint;
  // Obtains the comparison settings of the XML Checkpoint from script.
  XMLOptions = XMLCheckpoint.Options;
  // Checks if the Ignore Attributes option is enabled.
  if (XMLOptions.IgnoreAttributes)
  Log.Message("The Ignore Attributes comparison setting is enabled.")
  else
  Log.Message("The Ignore Attributes comparison setting is disabled.");

}

Python

def XMLCheckpointOptions():
  # Obtains the XMLCheckpoint object from script.
  XMLCheckpoint = XML.MyXMLCheckpoint
  # Obtains the comparison settings of the XML Checkpoint from script.
  XMLOptions = XMLCheckpoint.Options
  # Checks if the Ignore Attributes option is enabled.
  if XMLOptions.IgnoreAttributes:
    Log.Message("The Ignore Attributes comparison setting is enabled.")
  else:
    Log.Message("The Ignore Attributes comparison setting is disabled.")

VBScript

Sub XMLCheckpointOptions
  Dim XMLCheckpoint, XMLOptions

  ' Obtains the XMLCheckpoint object from script.
  Set XMLCheckpoint = XML.MyXMLCheckpoint
  ' Obtains the comparison settings of the XML Checkpoint from script.
  Set XMLOptions = XMLCheckpoint.Options
  ' Checks if the Ignore Attributes option is enabled.
  If XMLOptions.IgnoreAttributes Then
  Log.Message("The Ignore Attributes comparison setting is enabled.")
  Else
  Log.Message("The Ignore Attributes comparison setting is disabled.")
  End If

End Sub

DelphiScript

procedure XMLCheckpointOptions();
var XMLCheckpoint, XMLOptions;
begin

  // Obtains the XMLCheckpoint object from script.
  XMLCheckpoint := XML.MyXMLCheckpoint;
  // Obtains the comparison settings of the XML Checkpoint from script.
  XMLOptions := XMLCheckpoint.Options;
  // Checks if the Ignore Attributes option is enabled.
  if XMLOptions.IgnoreAttributes then
  Log.Message('The Ignore Attributes comparison setting is enabled.')
  else
  Log.Message('The Ignore Attributes comparison setting is disabled.');

end;

C++Script, C#Script

function XMLCheckpointOptions()
{

  var XMLCheckpoint, XMLOptions;
  // Obtains the XMLCheckpoint object from script.
  XMLCheckpoint = XML["MyXMLCheckpoint"];
  // Obtains the comparison settings of the XML Checkpoint from script.
  XMLOptions = XMLCheckpoint["Options"];
  // Checks if the Ignore Attributes option is enabled.
  if (XMLOptions.IgnoreAttributes)
  Log["Message"]("The Ignore Attributes comparison setting is enabled.")
  else
  Log["Message"]("The Ignore Attributes comparison setting is disabled.");

}

See Also

About XML Collection
Creating XML Checkpoints
About XML Checkpoints
About Web Service Checkpoints
CreateCheckpointOptions Method

Highlight search results