
silk4com
Summary
This project is an add-on for SilkTest 2009. The goal of this project is to provide a COM interface for the Open Agent, which can be used by many different scripting languages to drive the Open Agent. With silk4com you can use most of the JTF API in VBScript, JavaScript or even in VBA, without the need of a Java Compiler and JUnit.
Silk4COM is an Open Source project, so feel free to check out the source and play with it. There is also a binary package available if you don't want to build it yourself. If you would like to contribute please contact any of the project members.
Screencasts
Some videos that demonstrate how to use Silk4COM...
Setting up Silk4COM
http://www.youtube.com/watch?feature=player_embedded&v=d4WvtK5cwVY' target='_blank'>http://img.youtube.com/vi/d4WvtK5cwVY/0.jpg' width='425' height=344 />
more to come soon ...
Sample Script
The following code demonstrates a simple Google search in JavaScript:
// Desktop (instantiate silk4com desktop)
var desktop = new ActiveXObject("SilkTestLib.Desktop");
// Execute Base State (will return a testobject representing the browser window).
var browser = desktop.executeBrowserBaseState(
"C:\\Program Files\\Internet Explorer\\iexplore.exe", // executable
"www.google.com", // page to load
"/BrowserApplication/BrowserWindow", // main window locator
"xBrowser"); // TechDomains to load
// Do a google search
browser.find("//input[@name='q']").setText("SQA Forums");
browser.find("//input[@name='btnG']").select();
View the same script in VBS and in Java ...
Open Agent Console
The Open Agent Console provides a simple command line interface for the Open Agent. It is written entirely in JavaScript and therefore is a good sample on how to use the silk4com JTF wrapper classes. Just download the latest binaries or check out the source :)
View a screenshot...
Try it!
- Install SilkTest 2009 on your system (use the trial version if you don't have a license).
- Download the latest binaries from and register the SilkTestLib.dll (extract to any directory and run install.cmd).
- Run one of the sample scripts with Windows Scripting Host (in Windows Explorer simply double click a .js or .vbs file).
- View the sample scripts, change them, use different TechDomains to automate any other application (refer to the Silk4j API documentation for supported controls and methods, view the SilkTestLib.idl file for the exact desktop interface), etc.
- Check out the source code, implement missing features and fix bugs :)
Any feedback is appreciated
Project Information
- License: Apache License 2.0
- 5 stars
- svn-based source control
Labels:
SilkTest
JavaScript
VBScript
COM
Testing