Inconsistent results from .Exists

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Inconsistent results from .Exists

Post by stapes » Tue Dec 01, 2015 11:24 am

Whilst running a test on an IOS Device, I get an error message, Something's Wrong, which I had hoped I had already taken care of, using this code:

Code: Select all

if(repo.IOS365Agile.RichardPullinIPad.UIView.SomethingsWrongInfo.Exists (1000))
On running it, the If statement is evaluated negatively & control passes to the next statement.

However, the control does exist.

When I ran this - separately, it worked:

Code: Select all

Validate.Exists(repo.IOS365Agile.RichardPullinIPad.UIView.SomethingsWrongInfo);
How can one work & the other not?

I am using Ranorex Studio 5.4.3.26016

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

Re: Inconsistent results from .Exists

Post by odklizec » Wed Dec 02, 2015 9:11 am

Hi,

I think your problem is timing. I guess that when the condition is evaluated (as soon as previous step is finished), the given control really does not exists. In other words, the timeout 1000ms is probably too short? Eventually, there might be a problem with folder caching. Are you using caching? Try to turn it off for given control in repo.
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