Forum Discussion

Girl's avatar
Girl
Occasional Contributor
15 years ago

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

  • 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.
  • Girl's avatar
    Girl
    Occasional Contributor
    Visible properity = True

    In all my invisible cases.

    Please provide working solution to the problem.
  • 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.

  • Girl's avatar
    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.
  • 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.
  • Girl's avatar
    Girl
    Occasional Contributor
    Please provide Step by Step instructions.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    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
    • nagel's avatar
      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.