Indicator.Text Property

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

Use the Text property to determine the indicator text. To change the indicator text, call the PushText method.

Declaration

Indicator.Text

Read-Only Property String

Applies To

The property is applied to the following object:

Property Value

String holding the indicator text. The default text is Playback.

Remarks

The indicator updates its text every 500 milliseconds. So, if you change the text more frequently, some values will not display on screen.

Example

The code below demonstrates how you can set, restore and obtain the text that is shown under the indicator's icon.

JavaScript, JScript

function IndicatorDemo()
{
  // Shows the indicator icon
  Indicator.Show();
  // Pushes text to the indicator
  Indicator.PushText("Hello!");
  // Delays the script execution for 2 seconds
  aqUtils.Delay(2000, Indicator.Text);
  
  // Pushes new text to the indicator
  Indicator.PushText("New indicator text.");
  aqUtils.Delay(2000, Indicator.Text);
  
  // Restores the previous indictor text - "Hello!"
  Indicator.PopText();
  aqUtils.Delay(2000, Indicator.Text);
  
  // Clears the history of the indicator's user messages
  Indicator.Clear();
  
  // Hides the indicator icon
  Indicator.Hide();
}

Python

def IndicatorDemo():
  # Shows the indicator icon
  Indicator.Show()
  # Pushes text to the indicator
  Indicator.PushText("Hello!")
  # Delays the script execution for 2 seconds
  aqUtils.Delay(2000, Indicator.Text)
  # Pushes new text to the indicator 
  Indicator.PushText("New indicator text.")
  aqUtils.Delay(2000, Indicator.Text)
  # Restores the previous indictor text - "Hello!"
  Indicator.PopText()
  aqUtils.Delay(2000, Indicator.Text)
  # Clears the history of the indicator's user messages
  Indicator.Clear()
  # Hides the indicator icon
  Indicator.Hide()

VBScript

Sub IndicatorDemo()

  ' Shows the indicator icon
  Indicator.Show()
  ' Pushes text to the indicator
  Indicator.PushText("Hello!")
  ' Delays the script execution for 2 seconds
  Call aqUtils.Delay(2000, Indicator.Text)
  
  ' Pushes new text to the indicator
  Indicator.PushText("New indicator text.")
  Call aqUtils.Delay(2000, Indicator.Text)
  
  ' Restores the previous indictor text - "Hello!"
  Indicator.PopText()
  Call aqUtils.Delay(2000, Indicator.Text)
  
  ' Clears the history of the indicator's user messages
  Indicator.Clear()
  
  ' Hides the indicator icon
  Indicator.Hide()

End Sub

DelphiScript

function IndicatorDemo;
begin

  // Shows the indicator icon
  Indicator.Show;
  // Pushes text to the indicator
  Indicator.PushText('Hello!');
  // Delays the script execution for 2 seconds
  aqUtils.Delay(2000, Indicator.Text);
  
  // Pushes new text to the indicator
  Indicator.PushText('New indicator text.');
  aqUtils.Delay(2000, Indicator.Text);
  
  // Restores the previous indictor text - "Hello!"
  Indicator.PopText;
  aqUtils.Delay(2000, Indicator.Text);
  
  // Clears the history of the indicator's user messages
  Indicator.Clear;
  
  // Hides the indicator icon
  Indicator.Hide;

end;

C++Script, C#Script

function IndicatorDemo()
{
  // Shows the indicator icon
  Indicator["Show"]();
  // Pushes text to the indicator
  Indicator["PushText"]("Hello!");
  // Delays the script execution for 2 seconds
  aqUtils["Delay"]( 2000, Indicator["Text"] );
  
  // Pushes new text to the indicator
  Indicator["PushText"]("New indicator text.");
  aqUtils["Delay"]( 2000, Indicator["Text"] );
  
  // Restores the previous indictor text - "Hello!"
  Indicator["PopText"]();
  aqUtils["Delay"]( 2000, Indicator["Text"] );
  
  // Clears the history of the indicator's user messages
  Indicator["Clear"]();
  
  // Hides the indicator icon
  Indicator["Hide"]();
}

See Also

Indicator Object
Clear Method
PopText Method
PushText Method

Highlight search results