Why I cann't convert Combobox adapter to Control adapter?

Ask general questions here.
a30008
Posts: 4
Joined: Wed Jun 24, 2009 7:28 am

Why I cann't convert Combobox adapter to Control adapter?

Post by a30008 » Mon Jun 29, 2009 4:31 am

Hello,
I want to convert Combobox adapter to Control adapter using following code:
Ranorex.ComboBox combobox = CPS.FindSingle<Ranorex.ComboBox>(ComboBox_xpath);
Ranorex.Control Control_combobox = combobox.Element.As<Ranorex.Control>();
But when I compile, ranorex tell me that "The type or namespace name 'Control' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?)"
Could anybody help me to resolve the problem?
Thanks in advance.
a30008

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

Re: Why I cann't convert Combobox adapter to Control adapter?

Post by Support Team » Mon Jun 29, 2009 8:15 am

The definition of the Control adapter is compiled in the Ranorex.Plugin.WinForms.dll assembly (as it is a technology dependent adapter). So, please add a reference to this assembly to your project.

The project templates delivered with Ranorex Studio already have a reference to all Ranorex plugins included. If you create a project using another development environment (like Visual Studio), please add those references to your project as well.

Regards,
Alex
Ranorex Support Team

a30008
Posts: 4
Joined: Wed Jun 24, 2009 7:28 am

Re: Why I cann't convert Combobox adapter to Control adapter?

Post by a30008 » Tue Jun 30, 2009 6:31 am

It's work now, thanks Alex.