Getting Started with Telerik Testing Framework
Thanks for using Telerik Testing Automation infrastructure. To get started using this framework, please follow the instructions below. If you have further questions, feel free to contact us.
Installing and Setting Up the Infrastructure
To get started, first download the Telerik Testing Framework installer package and run the installation. Once it is complete, you will have all of the following placed in the Telerik Testing Framework %InstallDir% folder:
The Telerik Automation Infrastructure library. ArtOfTest.WebAii.dll (for version 2010 and older, ArtOfTest.Common.dll is also included).
Telerik's Internet Explorer client. ArtOfTest.InternetExplorer.dll.
Telerik's Firefox client: Automatically installed in your install directory.
Chrome: You should download and install manually Telerik Test Studio Chrome Playback extension from the Chrome Web Store. See this article for direct extension links.
Safari client: Automatically installed in your install directory.
Silverlight plug-in: ArtOfTest.WebAii.Mime.dll.
Our HTTP Proxy: ArtOfTest.WebAii.HttpProxy.exe.
ASP.NET TestRegion Custom Control: ArtOfTest.WebAii.AspNet.dll.
Visual Studio item templates for VS Team Test, NUnit, MbUnit and xUnit (Both VB.NET and C#). These are automatically registered with Visual Studio.
90+ Unit Test Code Samples to help illustrate the different features of the Telerik Testing Framework. You will find 4 zipped solutions: (QuickStarts_NUnit_CS.zip, QuickStarts_VSTS_CS.zip, QuickStarts_NUnit_VB.zip, QuickStarts_VSTS_VB.zip). You can use the sample solution that fits your language and testing framework of preference.
Release notes: ReleaseNotes.txt
API Reference help file. Documentation.chm
Link to the online Documentation including the Getting Started Guide.
Link to the online community forums.
Link to Telerik Premier Support description.
Both the Telerik Testing Framework library and the Internet Explorer client are installed and ready to use once the installation is complete. The templates are also installed into your local templates for the current user. You also have a copy of these templates under %InstallDir%\Visual Studio Templates.
Starting Automation Using Telerik Testing Framework
If you are using Visual Studio Team Test, please reference the Studio Team Test Using Visual topic.
If you are using NUnit, please reference the setup Using NUnit topic.
-
If you are not using NUnit or Visual Studio Team Test, you can still use Telerik Testing Framework from a Console Application, a Class Library, or a Windows Application. Simply follow the rest of the instructions below.
Note: For Visual Studio 2010, change the solution's "Target Framework" property to .NET Framework 3.5 or .NET Framework 4.0. The Client Profile Frameworks will not work.
Once Testing Framework is installed on the target machine, you can easily start using it from your .NET project by simply referencing the ArtOfTest.WebAii.dll (and ArtOfTest.Common.dll for version 2010 and older) file placed in your %InstallDir%. Those are the only dll's you need to reference to get the full functionality. To reference the Telerik library:
Select your project in the Solution Explorer in Visual Studio, or start a new project.
Right-click the References folder displayed in the solution and select 'Add Reference'.
Navigate to the ArtOfTest.WebAii.dll installed on your machine in your %InstallDir%\bin folder.
Select ArtOfTest.WebAii.dll (and ArtOfTest.Common.dll for version 2010 and older).
Click OK to finish adding the needed references.
Quick Start Sample Code
Before calling into any of the Telerik library methods, you need to make sure that you have properly initialized an instance of the Manager object passing in the settings you want used for this instance. To initialize the project:
// Initialize the settings
Settings mySettings = new Settings();
// Set the default browser
mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
// Create the manager object
Manager myManager = new Manager(mySettings);
// Start the manager
myManager.Start();
// Launch a new browser instance. [This will launch an IE instance given the setting above]
myManager.LaunchNewBrowser();
// Navigate to a certain web page
myManager.ActiveBrowser.NavigateTo("http://www.google.com");
// Perform your automation actions.
Element mybtn = myManager.ActiveBrowser.Find.ByTagIndex("input", 3);
myManager.ActiveBrowser.Actions.Click(mybtn);
// Shut-down the manager and do all clean-up
myManager.Dispose();
Dim mySettings As New Settings()
mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer
Dim myManager As New Manager(mySettings)
myManager.Start()
myManager.LaunchNewBrowser()
myManager.ActiveBrowser.NavigateTo("http://www.google.com")
Dim mybtn As Element = myManager.ActiveBrowser.Find.ByTagIndex("input", 3)
myManager.ActiveBrowser.Actions.Click(mybtn)
myManager.Dispose()
The Manager object exposes all methods/properties needed to perform browser automation, element identification, logging and DOM traversal including TestRegion identification. Below is a brief description of the key objects exposed off the Manager and their corresponding key object properties/methods:
Object | Type Name | Brief Description | Key Objects/Methods Exposed | Quick Start Tutorials |
---|---|---|---|---|
Manager. ActiveBrowser |
ArtOfTest.WebAii. Core.Browser | The most recent launched browser instance. You can use it to invoke actions, access the loaded document DOM and perform element identification and extraction using the Browser.Find object. | Browser.Actions, Browser.Find, Brower.DomTree, Browser.Window | Automating Browser Actions, Finding Page Elements, Multi-Browser Instance Support, JavaScript Support |
Manager. ActiveBrowser.Actions | ArtOfTest.WebAii. Core.Actions | Used to invoked direct DOM actions against the loaded document. | Actions.Click, Actions.SetText, Actions.Check, Actions.WaitForElement | Automating Browser Actions, Ajax Support, JavaScript Support |
Manager. ActiveBrowser.Find | ArtOfTest.WebAii. Core.Find |
Used to search the DOM elements of the associated browser. | Find.SearchRegion | Finding Page Elements, Introduction to TestRegions, FindParams as External Xml DataSource |
Manager. ActiveBrowser.DomTree | ArtOfTest.WebAii. Core.TreeBuilder | The full DOM Tree of the currently loaded document. | TreeBuilder.TestRegion's, TreeBuilder.Root | Finding Page Elements |
Manager. ActiveBrowser.Window | ArtOfTest.WebAii. Win32.Window | The window representation of this browser window. Use this object to manipulate the browser window and capture bitmaps. | Window.Handler, Window.GetBitmap() | Native Win32 Windows Handling, Visual Capturing |
Manager. ActiveBrowser.Frames | ArtOfTest.WebAii. Core.FramesCollection | Retrieves a list of the child frames contained in the browser window. | ById, BySrc, RefreshAllDomTrees, WaitUntilReady() | Frames Support |
Manager. ActiveBrowser.Regions | ArtOfTest.WebAii.ObjectModel. TestRegionCollection | Retrieves a list of the test regions identified in the DOM. | Count, Item, Items | Introduction to TestRegions, Using Asp.Net TestRegion Control |
Manager. Desktop |
ArtOfTest.WebAii. Core.Desktop |
Used to invoke pure UI automation events from the Mouse & Keyboard. | Desktop.Mouse, Desktop.Keyboard | Automating Browser Actions |
Manager. Log |
ArtOfTest.WebAii. Core.Log |
Provides logging support for the current manager session. | Log.WriteLine, Log.CaptureBrowser() | none |