I wanted to use an existing repository item path but then add to it to find a related element from which I could output a value (this will actually be used in validation later.
This is what I came up with and it works - It took me a little while to work it out (I'm still new). In the interest of improving my coding I am just wondering if there is a better/more efficient way than this
public void Get_Badge_Value() { RxPath path = repo.ComGroupcallEmerge.ViewAnimator.Scroller.android_widget_LinearLayout.LinearLayout1.StudentDetails.Timetable.GetPath(); path = path +"/../../text[@rid='badge']"; Text badge = Host.Local.FindSingle<Ranorex.Text>(path); string badgeNumber = badge.Element.GetAttributeValueText("Caption", new Regex("^([^a-zA-Z]*)")); Report.Info("User",badgeNumber); }Many thanks
Ben