how to find nested elements within the ArtOfTest.WebAii.ObjectModel.Element.
I want to a span element within a form. The form has a unique attribute, span element does not have unique attribute. We cannot go by TagIndex, since the content is dynamic.
We would like to use Element objectmodel and not HtmlControl type. The element has the property FindUsedExpression, but there is no option to find the nested element.
sample code:
Element parent = Manager.ActiveBrowser.Find.ByExpression(parentattribute); // parent
if (parent != null) {
Htmlcontrol control = parent.As<HtmlControl>();
HtmlControl child = control.Find.ByExpression<HtmlControl>(childattributes); // child ---- i don't want
if (child != null) {
child .Focus(); // focus;
}
}
regards
govind