Forum Discussion

Gary_1's avatar
Gary_1
Occasional Contributor
14 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