Hi,
I'm trying to verify if a wpf window exists on screen with validate.exists().
It works fine when i send in an element, or repoinfo item.
But when i send in an rxpath or string item it always returns false, even though the item is there.
My code:
I recieve a
rxpath: "/form[@name='Main Window - GPI']"
bool exists= Validate.Exists(rxPath, timeout, "Check Object '{0}'",new Validate.Options(false, ReportLevel.Warning));
Why do i always get false in this=?
Am i missing something??
The item is there, it works if i just call:
Validate.Exists(repo.iteminfo);
I need to validate with rxpath so that i can set searchtimeout.
really appreciate if anyone could help me in the right direction.
Validate exists returns false when using rxpath
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validate exists returns false when using rxpath
Hello,
This should work except the ReportLevel part.
Which version of Ranorex do you use?
Could you please provide us with more information about your code, or could you provide us with a code snippet and a snapshot file from the application?
Thank you!
Regards,
Bernhard
This should work except the ReportLevel part.
bool exists= Validate.Exists(rxPath, timeout, "Check Object '{0}'",new Validate.Options(false, ReportLevel.Warn));Which value is set for the timeout?
Which version of Ranorex do you use?
Could you please provide us with more information about your code, or could you provide us with a code snippet and a snapshot file from the application?
Thank you!
Regards,
Bernhard
Re: Validate exists returns false when using rxpath
Hi,
I've tried with both ranorex 3 and 4.
timout is set to 2, int value
Im just calling this specific method by sending in rxPath and timeout value.
And it always returns false!
Not sure what more information i can tell.
Its pretty basic.
Im attaching my simple project with a snapshot included from ranorex 3 project.
Let me know if you need anything more from me?
Br,
Feroz
I've tried with both ranorex 3 and 4.
timout is set to 2, int value
Im just calling this specific method by sending in rxPath and timeout value.
And it always returns false!
Not sure what more information i can tell.
Its pretty basic.
Im attaching my simple project with a snapshot included from ranorex 3 project.
Let me know if you need anything more from me?
Br,
Feroz
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validate exists returns false when using rxpath
Hello,
It looks like a timing issue.
Please try to increase the timeout to 500 ms.
Please let me know if it makes any difference in your test.
Regards,
Markus (T)
It looks like a timing issue.
Please try to increase the timeout to 500 ms.
Please let me know if it makes any difference in your test.
Regards,
Markus (T)
Re: Validate exists returns false when using rxpath
Hi again,
hmm thanks
i thought it was seconds, but i guess its ms.
need to read the details more
Thanks
/Feroz
hmm thanks

i thought it was seconds, but i guess its ms.
need to read the details more

Thanks
/Feroz
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validate exists returns false when using rxpath
Hello,
You are welcome
Regards,
Markus (T)
You are welcome

Regards,
Markus (T)