Ask general questions here.
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am


Post by rkarhe » Thu Oct 31, 2013 9:52 am


How to use Ranorex.Core.Element?
How can I create Wrapper for Ranorex.Core.Element?

When I am trying to inherit it says, The type 'Ranorex.Core.Element' has no constructors defined.

public class myElement : Ranorex.Core.Element //The type 'Ranorex.Core.Element' has no constructors defined.

I am new to c sharp, to me this looks like there is no public constructor for 'Ranorex.Core.Element' class.

Thanks in advance..

Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex.Core.Element

Post by krstcs » Thu Oct 31, 2013 1:42 pm

Why are you trying to inherit from Element? You should probably be using an adapter that more closely matches the UI element you are trying to automate. It would give you more precise control over the actions that can be taken against the element.

From looking at the API though, I do not see a constructor, and it does say that it dynamically implements capabilities and adapters, so I would guess that there is a factory that does this, which means that you probably will not be able to implement a wrapper for this class.
Shortcuts usually aren't...