How to use ControlFinder in cca crm 2011

May 17, 2011 at 7:01 AM

HI.,

I am new in cca Crm 2011. I am using CCA Workflow  SetControlValue  using username, password and ExecuteControlValue using Login button, Everything is working fine. After navigate page to find the "CustomerSearch" control

using ControlFinder, No action do for ControlFinder.  How to find that control.? How to solve this Issues..?

Any One Help Me..?.

Regards

Lings

May 17, 2011 at 1:08 PM

Im not clear on what your trying to do here…

Let me parrot this back…
You have a web page with a user name and password, and login button…
Using HAT, You have inspected the form and created control mappings…
then using an automation workflow, you used setcontrolvalue to populate the username and password then click the login button using Execute Control…

Then you want to find the customer search control after the page navigates?

I assume you have inspected the form you land on from the login page and have created a control binding for SearchControl?

Are you trying to do it in the same automation? Or are you using a RegisterForEvent and Triggering it based on DocComplete?

MattB-msft

May 17, 2011 at 1:44 PM

Hi Matt,

Thank you for the reply. Please find my answers below.

You have a web page with a user name and password, and login button…
Using HAT, You have inspected the form and created control mappings…
then using an automation workflow, you used setcontrolvalue to populate the username and password then click the login button using Execute Control…

Then you want to find the customer search control after the page navigates?

I assume you have inspected the form you land on from the login page and have created a control binding for SearchControl?

Yes, I have a login page that contains username,password and login button.

Using HAT I have set the username and password and  used Executedcontrol action on the login button. The page redirect to the Cusomersearch page.


Are you trying to do it in the same automation? Or are you using a RegisterForEvent and Triggering it based on DocComplete?

Yes using same automation. I tried to set customer name in customer Search textbox and execute the search button after the logging automation activites.

But, I am not able set Customer name in the customer search box. Please, Let me know how to do the customer search after login activity using single automation.

May 17, 2011 at 3:20 PM

Ok, Thanks..

So what is happening here is that the HAT is moving to the next step in your automation before the page completes loading… thus the control won’t be found.

The safe way to deal with this is to create a “director” automation and page specific automations..

For example

Assume that your always going to start on the login page, You would create an automation, as you have done now, however the last step, ( before pressing the button ), would be to add a RegisterForEvent shape and Listen for the DocumentComplete event.

The RegisterForEvent shape takes, as a property, the target HostedApplication and Action to Invoke, Action == Automation in UII. You would create a new Automation that will act as your page director going forward.. the first thing on this automation would be a GetActionData Shape.   This will get the URL that raised the Document Completed event.

Next you add a if shape in and decide what to do based on URL of the page, or you can use the FindControl shape to see if the Control is available on the page you just landed on.

Keep in mind that until you call UnRegisterForEvent, this automation will be called for each Documented Completed event that is raised.

Does that make sense? Bit hard to relay w/out a picture.

MattB.

May 18, 2011 at 10:34 AM

Hi Matt,

Thank you.. Great Example..! Its working Fine.

Lings