Forum Discussion

Gary_1's avatar
Gary_1
Occasional Contributor
15 years ago

Window is invisible and thus cannot be activated

I'm a novice user, and I can see that this has been discussed before, however, none of the answers are either suitable or complete enough to help.



I have recorded a test which involves entering text into list boxes and tabbing to the next and entering more text.  The test is saved as vbscript and is completeley stand alone. On play back, this works fine for the first and second boxes, but on the third I always recieve "The 'Test Element 1' window is invisible and thus cannot be activated" error message.  The subroutine posted below is exactly as it was recorded.  Immediate play back failed, as have all subsequent play backs.

Sub Test4

Dim wndPrestigeSystemAdmin

Dim toolbarWindow32

Dim edit

Set wndPrestigeSystemAdmin = Aliases.Pradmin.wndPrestigeSystemAdmin

Set toolbarWindow32 = wndPrestigeSystemAdmin.ReBarWindow32.ToolbarWindow32

Call toolbarWindow32.ClickItem("Add", False)

Set edit = wndPrestigeSystemAdmin.page327702.Item.Edit

Call edit.SetText("Test 1")

Call edit.Keys("[Tab]")

Call edit.SetText("Test Element 1")

Call edit.Keys("[Tab]")

Call edit.SetText("T1")

Call toolbarWindow32.ClickItem("Save", False)

End Sub



Can anyone please suggest what is going wrong, or offer a work around?



Thanks

17 Replies

  • Hi Gary,



    According to the snapshot, your control's Visible property is false. This can happen if the control is not drawn on the form when you're trying to access it. Do you see this edit box when TC tries to access it? I suspect that the click on toolbar (toolbarWindow32.ClickItem("Add", False)) doesn't perform the needed actions correctly.
  • Gary_1's avatar
    Gary_1
    Occasional Contributor
    Hi Jared



    Sorry for slow response.  I have been working away from the office.



    Yes, we are able to see the edit box.  We can actually see the cursor in the box, yet this message is the result.  There are definitely no overlapping windows.  The test is played back exactly as recorded, with no changes whatsoever.



    This is now a serious problem for us, for after investing in this product, we find we cannot test this apparently simple case, and cannot continue.



    Any suggestions as to how we can resolve this issue would be welcome.



    Gary
  • Hi Gary,



    Does it help if you remove any user iteraction (such as clicks) with your control from your test and assign a value to it via its wText property (obj.wText = "value"). Assigning values to controls' properties shouldn't cause such errors.
  • I am seeing the same issue.


    I am testing some screens which are tabbed. There are 3
    tabs on one screen and the next screen has about 8 tabs. On the first screen (with 3 tabs), I double click on an
    item which takes me to the second screen (with 8 tabs). When I try to playback the double click action on the first
    screen, the test fails saying that ‘The window is invisible and thus cannot be activated’.


    I have included the script and the screenshots for the
    same. Please tell me as to how this issue can be resolved.


    function Test2()

    {

    Aliases.ifrun60.wndui60MDIroot_W32.MDIClient.wndOptions.ui60Drawn_W32.ui60Drawn_W32.btnSprint3.ClickButton(); Aliases.ifrun60.wndui60MDIroot_W32.MDIClient.wndOptions.ui60Drawn_W32.ui60Drawn_W32.btnCmdashboard.ClickButton();

    Aliases.ifrun60.wndui60MDIroot_W32.MDIClient.wndui60MDIdocument_W32.ui60Drawn_W32.ui60Viewcore_W32.ui60Drawn_W322.Click(52, 14);

    Aliases.ifrun60.wndui60MDIroot_W32.MDIClient.wndui60MDIdocument_W32.ui60Drawn_W32.ui60Viewcore_W32.ui60Drawn_W32.Click(53, 59);

    Aliases.ifrun60.wndui60MDIroot_W32.MDIClient.wndui60MDIdocument_W32.ui60Drawn_W32.ui60Viewcore_W32.ui60Drawn_W32.Edit.Click(36, 9);

    Aliases.ifrun60.wndui60MDIroot_W32.MDIClient.wndui60MDIdocument_W32.ui60Drawn_W32.ui60Viewcore_W32.ui60Drawn_W321.btnPriorityList.ClickButton();

    }




  • Gary_1's avatar
    Gary_1
    Occasional Contributor
    I am still seeing this problem.  Any information you can share would be invaluable.
  • Gary_1's avatar
    Gary_1
    Occasional Contributor
    I am still seeing this problem.  Any information you can share would be invaluable.