How do I get Element from IElement?
How do I get Element from IElement?
I learnd how to browse the tree of application elements (IElement.Children) and find the required element by its attribute name. However, now I need to click it, but Click method belongs to Ranorex.Element object. How do I get the Ranorex.Element object out of the corresponding Ranorex.Core.IElement object?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Hey taralex,
you can use the Ranorex.Core.Mouse class for IElement/Element Objects.
(maybe this conversion will not work with Preview Revision lower than Build 4593)
in Ranorex 2.0 Preview (Build 4395 - October 21, 2008) you can use the IElement Object instead.
Regards,
Chris
Ranorex Support Team
you can use the Ranorex.Core.Mouse class for IElement/Element Objects.
Code: Select all
Element elem = CalculatorObjects.Button7.Element.As<Element>();
Mouse.Click(elem);
in Ranorex 2.0 Preview (Build 4395 - October 21, 2008) you can use the IElement Object instead.
Regards,
Chris
Ranorex Support Team