Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locate an alert window

Status
Not open for further replies.

canberrasnag

Programmer
Nov 25, 2004
19
RU
if I type in bad text in a form field, an alert appears when I click submit.

Anyone have any idea how to find that alert window so that I can click OK

using WSH VBScript

Thanks
 
Hello canerrasnag,

If you use script to automate navigating and filling forms, you have to avoid alert/confirm/prompt types user interactive. They are not stand-ready for being referenced within the script---at least [blue]I'm not aware of any method to get to them[/blue]. The reason is again related to the security and user's privacy.

In order to get away with them, you may have to remove and add back your own eventlistner.

May be some other may give you a positive and direct handle of them. I'm also interested in knowing.

regards - tsuji
 
what about the find window finction?
can that be used to find the window.
 
canberrasnag,

The alert box will show up as a top level window. The problem I can see if it is modal for windows platform. Not to mention findwindow is not immediately available for scripting, though you know if there is a will there is a way, how the flow of logic in the script adapt to this situation is not clear to me. Somebody might know better. I'm all ear.

- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top