[Forms] Automation of Custom Control

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
WernerP
Posts: 2
Joined: Tue Sep 25, 2012 10:02 am

[Forms] Automation of Custom Control

Post by WernerP » Wed Sep 26, 2012 10:00 am

Hello!

I am just testing ranorex to automate a WinForms Application written in C# using a custom control. The control is userdrawn and as it is open source i have the source code.

After investigating some time searching the forums and reading the user doc i did not find the proposed way to automate the plugin- I did try the GDI approach but it did not work for me (no nested subcontrols were found).

What is the porposed way to automate such a control?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: [Forms] Automation of Custom Control

Post by Support Team » Wed Sep 26, 2012 12:52 pm

Hi,

Are you able to identify the element with Inspect or with the AccExplorer?
Which Ranorex version are you using?
Could you send us a Ranorex snapshot file of your application?
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.
In general if a WinForms control cannot be identified with Ranorex there are two ways how you can overcome this issue, you can add accessibility to enable Ranorex to identify this control as described in the following blog: Enabling automation for 3rd party controls by adding Accessibility, or you can use invoke remotely to remotely execute a specific method/perform a specific action as described in the following blog and forum posts: Transferring data to and from a .NET control, link1, link2 and link3.
If you have additional questions regarding your code we would also need the source code in order to guide you through this.

Regards,
Markus
Ranorex Support Team

WernerP
Posts: 2
Joined: Tue Sep 25, 2012 10:02 am

Re: [Forms] Automation of Custom Control

Post by WernerP » Wed Sep 26, 2012 1:05 pm

Hi Markus,

thanks for your fast reply- funny thing is i am using exactly the control used in the blog entry- I will look into this- thanks a lot.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: [Forms] Automation of Custom Control

Post by Support Team » Wed Sep 26, 2012 1:22 pm

Hi,

You're welcome!
I am glad I was able to point you to the right blog entry :D.

Regards,
Markus
Ranorex Support Team