Indicator.Hide Method

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

Description

Use this method to remove the TestComplete indicator icon and indicator’s text baloon from the screen. It may be useful, for example, if the indicator is situated over the information you would like to observe during the script run. To show the indicator on the screen, use the Show method.

Declaration

Indicator.Hide()

Result None

Applies To

The method is applied to the following object:

Result Value

None.

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
Show Method

Highlight search results