Discrepancy between Repository object and hard coded XPath
Posted: Wed Apr 30, 2014 3:27 pm
I have a repository item named CreateRx. When highlighted, this control is found without any problems.
When executing a simple click command on the same item, Ranorex finds another control in the application that is not in the same XPath.
Executing the same script, but with a hard coded XPath from the Repository, it finds the right control.
Repository Item
Ubik Base: "/form[@automationid='c92f2fb4abc249f98b2165ad8d529a31']"
Rooted Folder: FooterPanel
CreateRx: "toolbar[@automationid='639bddcdc6684543b02f3ed6f45a4807']/button[3]"
This is the control that Ranorex finds that is not correct:
Any suggestions ?
Ranorex V. 5.0.2.17874
.Net Runtime Version 4.0.30319.18444
Windows 7 64bits
When executing a simple click command on the same item, Ranorex finds another control in the application that is not in the same XPath.
Executing the same script, but with a hard coded XPath from the Repository, it finds the right control.
Repository Item
Ubik Base: "/form[@automationid='c92f2fb4abc249f98b2165ad8d529a31']"
Rooted Folder: FooterPanel
CreateRx: "toolbar[@automationid='639bddcdc6684543b02f3ed6f45a4807']/button[3]"
Code: Select all
var createRx = repo.Ubik.FooterPanel.CreateRx;
createRx.Click();
Code: Select all
Button createRxButton = repo.Ubik.AbsoluteBasePath.ToString() + "/toolbar[@automationid='639bddcdc6684543b02f3ed6f45a4807']/button[3]";
createRxButton.Click();
Code: Select all
toolbar[@automationid='670fb5b849cb414aadada24cf0945f62']/button[2]
Ranorex V. 5.0.2.17874
.Net Runtime Version 4.0.30319.18444
Windows 7 64bits