Categories
Scripts

VBScript to Access Database via Internet Explorer DOM

Source Code on GitHub 

This automation script was created to quickly access multiple records in a web-based database. The requirement was to search for a numeric ID, update some properties in the resultant HTML form via the DOM, save, and print the results. Initially developed with a co-worker, the finalized script was revised, debugged, commented, and tested by me for final use by the team on a whole. VBScript was chosen for compatibility with Windows.

Functions include: connect to an Internet Explorer COM object, load a page into IE, wait for pages to load and properly reconnect to page, read information from an HTML form’s DOM, submit information into the page, write to log files, read and write to CSV files, print web pages, & get verified input from user.

(Script has been modified to remove identifying information, but core VBScript methods to work with IE COM objects and the HTML DOM are left intact for reference.)