VisibleOnScreen Property

Applies to TestComplete 15.64, last modified on June 12, 2024


Specifies whether the whole object or any of its parts is currently visible on screen.



Read-Only Property Boolean
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

All onscreen objects.

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

True if any part of the object is currently visible on screen, otherwise False.


  • The VisibleOnScreen property returns true, if a control or its part is on screen and can accept mouse clicks. For example, focused controls whose opacity is set to 0 are absolutely transparent (that is, invisible), but their VisibleOnScreen property will return true.

  • The VisibleOnScreen property is always false for disabled Silverlight controls.

  • The Name Mapping repository of your project uses various object properties to identify objects in your tested application. We do not recommend that you use VisibleOnScreen as an object identification property. It can take much time for TestComplete to get the property value that can significantly decrease your test performance, especially if the Extended Find is used.

    For the same reason, we do not recommend that you use the VisibleOnScreen property in search criteria of the Find, FindChild, FindAll, and FindAllChildren methods. TestComplete will have to get the value of this property of every object it checks when calling the methods that can decrease your test performance.


The following example demonstrates how to use the VisibleOnScreen property in scripts:

JavaScript, JScript

var w = Sys.Process("Notepad").Window("Notepad");

if (w.VisibleOnScreen)
Log.Error("The Notepad window is invisible.");


w = Sys.Process("notepad").Window("Notepad")
if (w.VisibleOnScreen):
  Log.Error("The Notepad window is invisible")


Dim w
Set w = Sys.Process("Notepad").Window("Notepad")

If w.VisibleOnScreen Then
  Log.Error "The Notepad window is invisible."
End If


var w;
  w := Sys.Process('Notepad').Window('Notepad');

  if w.VisibleOnScreen then
     Log.Error('The Notepad window is invisible.');

C++Script, C#Script

var w = Sys["Process"]("Notepad")["Window"]("Notepad");

if (w["VisibleOnScreen"])
   Log["Error"]("The Notepad window is invisible.");

See Also

Enabled Property
Visible Property
Focused Property (Window and BrowserWindow Objects)

Highlight search results