How to click a MFC Element : General Questions

How to click a MFC Element

Ask general questions here.

How to click a MFC Element

Postby vengaishiva » Mon Jul 04, 2011 10:02 am

Hi,
I have a MFC date control in my application. Ranorex identifies it as 'Element'. I want to click the Element through code. But there is no method Click for Element class. How can achieve clicking on that element?

Code is like this:
Element ele = "rxpath of element";
ele.Click() //How to achieve this?

Regards,
Siva R S
vengaishiva
 
Posts: 62
Joined: Wed Mar 09, 2011 5:40 pm

Re: How to click a MFC Element

Postby sdaly » Mon Jul 04, 2011 11:25 am

You could try ele.InvokeAction("Click", null); or declare as Ranorex.Unknown rather than Element.
User avatar
sdaly
 
Posts: 213
Joined: Mon May 10, 2010 12:04 pm
Location: Dundee, Scotland

Re: How to click a MFC Element

Postby Support Team » Mon Jul 04, 2011 11:51 am

sdaly wrote:ele.InvokeAction("Click", null);

That InvokeAction will not work, but as you said using Ranorex.Unknown instead of Element does :-)
Ranorex.Unknown ele = "rxpath of element";
ele.Click()

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: How to click a MFC Element

Postby vengaishiva » Mon Jul 04, 2011 12:36 pm

Thanks a lot.
Ranorex.Unknown worked :D
vengaishiva
 
Posts: 62
Joined: Wed Mar 09, 2011 5:40 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests