I am receiving an invalid RxPath exception when I am trying to find a Ranorex.TreeItem using an RXPath I extracted from the TreeItem using GetPath.
I have a Tree that I read all the data from and store it in an array that I can access later.
The code used to get the RxPath is:
Code: Select all
string strXPath = Item.Element.GetPath(Ranorex.Core.PathBuildMode.Reduce).ToString();
Code: Select all
/form[@controlname='frmMainDialog']/element/*/container[@controlname='panel1']/element/tree/container[@accessiblename='Data Panel']/treeitem[@accessiblename='Node4']
Code: Select all
HDTreeItem = HDClientForm.FindSingle(strXPath, 5000);
HDTreeItem.DoubleClick();
Code: Select all
Ranorex.RxPathException: Invalid RxPath '/form[@controlname='frmMainDialog']/element/*/container[@controlname='panel1']/element/tree/container[@accessiblename='Data Panel']/treeitem[@accessiblename='Node4']|'. ---> Ranorex.RxPathException: Invalid character at character position 165. at Ranorex.Core.RxPath.TryInit(String path) --- End of inner exception stack trace --- at Ranorex.Core.RxPath..ctor(String path) at Ranorex.Core.RxPath.op_Implicit(String path) at H_MathRegression_English.Program.Test1(Form HDClientForm, String[] strArrayPBSStartingValues) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\H$MathRegression_English\H$MathRegression_English\Program.cs:line 630