Ask a Question

Window is invisible and thus cannot be activated

Girl
Occasional Contributor

Window is invisible and thus cannot be activated

I am getting "the window is invisible and thus cannot be activated" message.

Test Complete can't find application Button to click on.

What can be done to make Test Complete see where to click?
8 REPLIES 8
YMinaev
Staff

Hi,



This can happen because the target object is not shown on the screen. Before clicking, check its VisibleOnScreen property. If it is False, try activating the parent window by calling its Activate method.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Girl
Occasional Contributor

Visible properity = True

In all my invisible cases.

Please provide working solution to the problem.
YMinaev
Staff

Hi,



Read my previous post carefully. As I said:

Before clicking, check its VisibleOnScreen property. If it is False, try activating the parent window by calling its Activate method.

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Girl
Occasional Contributor

Here is my steps:

-using object Properties find tool drag the tool to the "Invisible window" before clicking on it.

-In the search box type: "VisibleOnScreen"

-Look at the results.

-Results: VisibleOnScreen = TRUE

Please correct me if I didn't follow your instructions.
YMinaev
Staff

Hi,



Actually, I mean checking VisibleOnScreen in your script before trying to perform any actions with the target control. If you get True, proceed with clicking, otherwise, call Activate of the top-level parent of your button.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Girl
Occasional Contributor

Please provide Step by Step instructions.
AlexKaras
Champion Level 2

Hi,



Jared meant modifying your script test code like this (VBScript mokup):

If (yourTestedObject.VisibleOnScreen) Then

  ' your current code

Else

  Log.Error(yourTestedObject.FullName & " is not visible on screen")

End If
Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
nagel
Occasional Contributor

If the other suggestions are not working; check the Task Manager to see if you have duplicate applications running. I had this same issue, and noticed I had two "cmd.exe" running, one process was hung without visability on screen.

cancel
Showing results for 
Search instead for 
Did you mean: