Hi,
What is the exact aim you want to achieve with this "if"-statement?
This "if"-statement is only for the testing purpose. If I have property
AbsolutePath which resturns
RxPath object (absoulte path) I would expect that when I invoke
IsAbsolute then I get
True. But the returned value in this case is
False which (for me) means that this is not absolute path.
When I look on Absolute Path of some repository elemenet in the Ranorex Studio i can se that the path starts with a slash "/".
Anyway I implemented method which expects absolute path as an input. Thus at the beginnig it checks if it is absolute or not. If not it throws exception:
Code: Select all
private bool FindApplicationUpdaterIcon(RxPath path, out Ranorex.Button appUpdaterBtn)
{
if (!path.IsAbsolute)
throw new RanorexException("Not absolute path! Path:" + path.ToString());
What I noticed about paths is that when it starts with slash then IsAbsolute returns true in other case it returns false.
Anyway I noticed that i do not really need absolute path because I want to search some controls on my local host. Thus if I use not absolute path I must(?) give a context from which the searching starts. In my case
Host.Local.TryFindSingle the Host.Local is the context. Thus the controls can be found.
I was not able to find the control as I was not covered all cases of text attribute which it can have.
Summary - I was able to solve my issue
but I'm still surprised that when I use
some_controlInfo.AbsolutePath.IsAbsolute I get
False