Automation Adapter Multi-threading

Jan 3, 2012 at 10:11 AM

Hi,

          I have 2 windows application running on CCA and uses an automation adapter while loading the application. But only one application automation is completed successfully. This is caused because the application's focus is lost during the automation process. 

I have written my automation code for both the application within the Desktop Load Completed Event of the adapter. Any idea how this could be resolved.

Thanks

  Abish

Jan 3, 2012 at 10:17 PM

If your application automation actions require focus, then you will need to maintain focus while that is executing.. however many times you do not need to maintain focus to do automation,

What sort of application are you automating?

MattB.

Jan 4, 2012 at 9:51 AM
Edited Jan 4, 2012 at 11:33 AM

Hi Matt

 Thanks for your response.

            I am launching 2 windows application and a web application which uses single sign-on process, So I need to automate the login process for all the three applications.  ie I need to enter the username and password onload of the application and keep the application logged in by the time CCA launches.

On the WPF windows application, I also need to enter a value to the text box and click on a submit button which runs a process in the application. I am sending focus to the application and send tab keys , enter keys using win32 api to automate this process. 

But the multiple threads running within CCA tries to do multiple process the same time and the applications lose focus half way through automation.

Give me some ideas to resolve this issue please? All my code is written in Desktop Launch Completed event and I have separate adapters for each applications.

Thanks

Abish

Jan 4, 2012 at 1:34 PM

For the WPF Applications, how are you automating them?

Using HAT? Or an adapter?

Jan 4, 2012 at 1:44 PM

Matt,   I am using an Adapter for each application.

Abish

Jan 5, 2012 at 11:34 AM

Matt,

           Can you suggest me a solution for this please? I am stuck with this issue at the moment.

Thanks

  Abish

Jan 24, 2012 at 1:55 PM

Im sorry for the slow response, got pulled into other things, did you sort this out? If not, Generally you want to use the Microsoft Automation API from the adapter, it’s the same system we developed for Testing applications.

http://msdn.microsoft.com/en-us/library/aa348551.aspx

In that case, you acquire the button using its automation UI tag and interact with it.

Mattb-msft