webDOMinator - Minion Scripting Language Reference

Search a Command:
<< Back to Browser Level Commands

killalert

Usage...
killalert[:window-title-search:button-search]
Put this command on a line before the command you're using that will popup a javascript alert or confirm box, and it will kill the popup within 2 seconds. To use a standardized killalert just call this by itself. If you need to click a certain button in a certain window, use the window-title-search to match up the first part of the text of the window, and then a button-search to match the text of the button you want to click.
This applies to webDOM version 2.0.1 and above.

User Comments on killalert

When and where to use killalert

Written by: webDOMinator 2 years and 5 months ago

Okay, so many people get confused as to when exactly they need to run the killalert command in their scripts. The killalert command actually fires off the "killalert.exe" program located in your webDOM install directory. The killalert program just waits 2 seconds and then clicks on the "OK" button from a javascript popup by searching for it's window title and then the okay button and sending a windows "click" signal to the OK button. Here's an example of how to use it in a script where you're clicking on something that brings up a javascript alert.

Code
navigate:http://somesite.com/user.profile.php?id=^wd.curinfo
killalert
click:dom.a.Add Friend

In the above case, you're navigating to the user profile page and then two seconds after you click the dom.a.Add Friend button, the javascript alert box that comes up will dissapear and automation will continue.

In some cases, the alert popup might have a non-default window title or button you want to click. The normal title for a javascript alert popup window is "Microsoft Internet Explorer" and the normal button you want to click on is "OK"... let's say you want to click "No" instead.
Code
...
killalert:Microsoft Internet Explorer:No
click:dom.input.Send

...or let's say you wanted to click on a completely different button in a different window, you could do it as long as you knew the title of the window you're looking for and the button on that window to click.
Code
...
killalert:Microsoft Word:No
shell:msword

the above would be let's say that if a javascript popup came up when you opened msword, that you had to click no to for instance.

Post a Comment About the "killalert" Command
Title:
Comment:
Post as Anonymous:
User Login
Username:
Email:
Password:
webDOMinator is copyright ©2008, 2009, 2010, 2011, 2012 Nathaniel D. Gibson. All Rights Reserved.
Contact | Tutorials | Forum
By using webDOMinator you are taking all liability in to your own hands. Nathaniel D. Gibson is not responsible for any damages, loss, or defamation (legal or otherwise) caused to you or your business from using this program. Nathaniel D. Gibson is not associated with, affiliated with, nor responsible for the content submitted and displayed by users of this site.