UIAutomation automating a software build/publish in CodeCharge 4.3 - simple robust alternative to SendKeys?

StackOverflow https://stackoverflow.com/questions/15422533

Question

I am trying to automate the build/publish of a large project implemented in Classic ASP using CodeCharge 4.3.

I know Classic ASP is a scripting language and our application is not really "compiled" per se, but during the publish process, the CodeCharge ID can detect pages that have become corrupted which is unfortunately a common event for us. I want to hook this into TeamCity for CI.

CodeCharge has no commandline interface, hence the need to automate the UI,

I've been using the .NET UIAutomation clasess and have successfully managed to get the IDE to load, trigger a publish, capture the output from the output window, and then exit.

To trigger the publish I'm sending an F9 keypress using http://inputsimulator.codeplex.com/. I'm not entirely happy with this because it falls over if CodeCharge loses focus. Is there a way to use UIAutomation to send an F9 keypress to a window irrespective of whether it has the focus?

Publish can also be triggered from a toolbar, a menu, or a context-menu attached to a treeview. I have not had much luck with any of these because these elements don't seem to be exposed. For example, using inspect.exe, I can find the toolbar (Name="Standard", Classname="CCSToolbarWindow") but neither inspect.exe or my UIAutomation application see anything below that. The only pattern inspect.exe sees available on the toolbar element is "IsLegacyIAccessiblePatternAvailable = True. I suppose I could potentially send a left-click event to the toolbar at specific coordinates, but this is getting out of my league.

I think because this application is quite old, I might have to look at the unmanaged UIAutomation stuff, or get deeper into the Win32 API or something if I was to continue to pursue, but I was hoping for a simpler solution.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top