.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

UI Automation with DataTemplate

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :WPF
Hello All! I'm trying to test a WPF application that uses lots of DataTemplates. I'm trying to test the UI aspect of the app by the means of UI Automation. Unfortunately, when I try to find element of interest, I always fail. I have tried using UISpy (which, if I'm not mistaken, shows what UI Automation sees) and still no luck. UISpy doesn't show anything inside of a template. I was wondering if anyone has faced this issue before and how can I get passed this "wall'. Thanks for your help. dimaj

View Complete Post

More Related Resource Links

Excel Automation in .Net

Excel Automation is a buzz word in both webapps and winapps. In the programming life (like Mr.Anderson neo) I guess almost every one could have come across this word. For others let me go further in detail. Excel Automation is automating some or all of the process involved in creating or updating excel worsheets.

How to run Office macros by using Automation from Visual Basic .NET

This step-by-step article describes how to call Office macros from a Visual Basic .NET Automation client.

You can use Microsoft Office Automation to open a document or create a new document that contains a Visual Basic for Applications (VBA) macro and execute the macro at run time.

Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


Word Automation - Multiple DCOM Errors/Behavior

Before I get started, I already know that Microsoft does not support and highly discourages server-based MS Office automation.  I've read a multitude of posts and smarmy "*wink*, here's a link" replies, so I'm looking for actual help here, not condescending reprimands.

That notwithstanding, here is my problem.  I have developed a simple method that will open a local Word document, modify some header information, and then save the document as a new file.  As expected, it works great as a console/windows app, but as soon as I went to ASP.NET, DCOM jacked my world up when accessing the app remotely from a different domain account (that has access to the ASP.NET app.  For reference, my method is shown below:


1    public static string ModifyAndSaveBuildDocument(string localFilePath, BuildDocumentType docType, string buildNumber, DateTime buildDate, string projectName)
2            {
3                try
4                {
5                    ProjectConfiguration config = (ProjectConfiguration)ConfigurationManager.GetSection("ProjectConfiguration");

Test Run: Web Application HTTP Request-Response Test Automation with JavaScript


Write a simple browser-based request-response test automation using JavaScript that's platform independent and useful when you are working in a highly dynamic environment.

James McCaffrey

MSDN Magazine January 2010

Test Run: Web UI Automation with Windows PowerShell


Here we show you how to use Windows PowerShell to create quick and easy UI test automation for ASP.NET and classic ASP Web applications.

Dr. James McCaffrey

MSDN Magazine March 2008

Test Run: Custom Test Automation with Team System


In this month's column Dr. James McCaffrey describes some of the ways you can use the Visual Studio 2005 Team System to manage custom software test automation.

Dr. James McCaffrey

MSDN Magazine Launch 2008

Test Run: The Microsoft UI Automation Library


James McCaffrey shows you how to get started with UI test automation using the new Microsoft UI Automation library.

Dr. James McCaffrey

MSDN Magazine February 2008

Test Run: UI Automation with Windows PowerShell


This installment of Test Run is a guide to using Windows PowerShell to perform ultra lightweight UI automation.

Dr. James McCaffrey

MSDN Magazine December 2007

Test Run: Test automation with Windows XP Embedded


This month's column explores how to create lightweight but powerful UI test automation for software systems that run on Windows XP Embedded.

Dr. James McCaffrey and Mike Hall

MSDN Magazine October 2007

Test Run: AJAX Test Automation


This month James McCaffrey presents a technique that allows you to write lightweight test automation to verify the functionality of AJAX Web applications.

Dr. James McCaffrey

MSDN Magazine February 2007

Test Run: Low-Level Web App UI Test Automation


As Web applications have become more complex, testing them has become more important. There are many testing techniques available to you. For example, in the April 2005 issue of MSDN®Magazine, I describe a simple JScript®-based system that can test a Web app through its UI by using the Internet Explorer Document Object Model.

James McCaffrey

MSDN Magazine October 2005

Test Run: Low-Level UI Test Automation


There are several ways to test a Windows®-based application through its user interface. For example, in the January 2005 issue of MSDN®Magazine (Test Run: Lightweight UI Test Automation with . NET) I described a lightweight technique for testing .

James McCaffrey

MSDN Magazine September 2005

Test Run: Lightweight UI Test Automation for ASP.NET Web Apps


The release of ASP. NET revolutionized Web development and made it easy to create full-featured Web applications. Visual Studio® 2005 and ASP. NET 2. 0 will let you add even more functionality to your applications, but the more features a Web application has, the more important testing becomes.

James McCaffrey

MSDN Magazine April 2005

Test Run: Lightweight UI Test Automation with .NET


Manual user interface testing is one of the most fundamental types of software testing and it's the kind of testing that most software engineers first experience. Paradoxically, automated user interface tests are probably the most technically challenging kind of test to write.

James McCaffrey

MSDN Magazine January 2005

Test Run: API Test Automation in .NET


The most fundamental type of software test automation is automated API testing. API testing essentially entails testing the individual methods that make up a software system rather than testing the overall system itself.

James McCaffrey

MSDN Magazine November 2004

Test Run: Test Automation for ASP.NET Web Apps with SSL


If you're encrypting user data with Secure Sockets Layer (SSL) over HTTP and you want to test your Web applications programmatically you'll find that the techniques are not widely known. In this month's column I'll show you how to set up a test SSL server and write test automation that verifies the functionality of a simple but representative Web application.

James McCaffrey

MSDN Magazine August 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend