FindPath Question

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
QATest879
Posts: 31
Joined: Fri Jul 02, 2021 2:35 pm

FindPath Question

Post by QATest879 » Tue Jan 25, 2022 8:54 pm

So, I have been testing out FromPath and it works but only attempts to find the element one time and fails if it doesn't find it after 1 attempt...

My code is like this: Element testelement = Ranorex.Core.Element.FromPath(path);

Because it only looks for the element one time and doesn't attempt it more than one time, sometimes it can't find the element... is there any way to make the code search for the element more than one time before giving up and quitting and exiting?

Thank you.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: FindPath Question

Post by odklizec » Wed Jan 26, 2022 3:01 pm

Hi,

I'm afraid, I'm not quite sure what's your goal and what's the workflow of your test? Also I'm not used to FromPath method ;) But have you considered using Find/FindSingle method with Duration overload?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration