Page 1 of 1

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

Posted: Mon Jun 29, 2009 4:31 am
by a30008
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

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

Posted: Mon Jun 29, 2009 8:15 am
by Support Team
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

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

Posted: Tue Jun 30, 2009 6:31 am
by a30008
It's work now, thanks Alex.