Clicking on a control/element

Class library usage, coding and language questions.
testMunky
Posts: 6
Joined: Wed Jan 16, 2008 11:52 am
Location: Hants, UK
Contact:

Clicking on a control/element

Post by testMunky » Wed Jan 30, 2008 5:53 pm

Hi,

is there a way of 'clicking' a control or element without the use of the mouse?

I currently use the following:

Code: Select all

Mouse.ClickElement(element, MouseButtonType.LeftButton); or
Mouse.ClickControl(control, MouseButtonType.LeftButton);
I can't find an alternative in the help, but its been a long day and i may have just missed it! hehe

sorry for being lazy

:D

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Thu Jan 31, 2008 10:42 am

If the control is a button, you can call Button.Click().
With an element Element.DoDefaultAction() should be the method you're searching for.

Regards,
Alex
Ranorex Support Team