IE Automation with Task Scheduler

In Advanced Task Scheduler Professional and Network starting from version 4.3 you can automate web browsing: clicking a button, entering data in a text box etc.

The automation is performed by executing series of commands against the document opened in the Internet Explorer web browser. Commands allow you to interact with controls like links, buttons, radios, checkbox, text fields etc. In order to interact with a control it has to be found in the document. A control can be found by matching one of its attributes like id, name, class etc.

An IE Automation command has four parts:
Command - command name.
Argument - name of an attribute that will be used to find the control in the HTML document.
Value - value of the attribute in the Argument.
Parameter - additional parameter, it is different for different commands.
You can find detailed commands and their arguments explanation in the IE Automation topic in the Online Manual.

The examples below demonstrate how to use Argument and Value in IE Automation commands to find controls in HTML documents with HTML code snippets.


Command Argument Value Parameter
GotoURL url

This command navigates to the given URL and waits for it to be loaded completely. Optionally, the URL can be saved to the file specified in the Parameter instead of being opened in the browser.


Command Argument Value Parameter
ClickLink linktext Go Test

This command finds the link with the given text and clicks it. It will find a link represented by the HTML code like this:

<a href="index2.php">Go Test</a>


Command Argument Value Parameter
SetTextBox name username admin

This command finds the text box with the given name and changes its text to "admin". It will find a text box represented by the HTML code like this:

<input type="input" name="username">


Command Argument Value Parameter
ClickButton id LoginContent_btn_Continue

This command finds the button with the given id and clicks it. Optionally, the produced content can be saved to the file specified in the Parameter, this is useful to download auto-generated files. It will find a button represented by the HTML code like this:

<input id="LoginContent_btn_Continue" type="submit" value="Continue">


Command Argument Value Parameter
SelectButton beforetext Remember me: check

This command finds the check box or radio button which has the given text before it and sets its state to "checked". It will find a button represented by the HTML code like this:

Remember me: <input type="checkbox" name="remember">


Command Argument Value Parameter
SelectOption name multi one

This command finds the select list with the given name and selects option with the value "one". It will find a select list and option represented by the HTML code like this:

<select name="multi" multiple size=5>
<option value="one">One</option>
<option value="two">Two</option>

Testing and Research

In the Options section of the IE Automation shortcut type, you can select the "Show browser window" option. When this option is selected the browser window will appear on the screen and you'll be able to see how automation commands are being executed.

You can also select the "Do not close browser window when finished" option. This way the browser window will be left opened when the automation commands are finished. You can right-click anywhere on the browser window and select the "View Elements" command from the context menu. This command will show you a list of all elements with their attributes in a separate window.

IE Automation View Elements
Click the picture to enlarge.

IE Automation

Categories: Task scheduler

Leave a Reply

About us   Cookie policy   Privacy policy   Terms of use   Link to us