WaitFor NotExists does nothing?

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

WaitFor NotExists does nothing?

Post by stapes » Tue Jul 12, 2016 9:44 am

I was testing an Android Application using Ranorex Studio 6. It got hung up sending a request - leaving a dialog "Sending request. Please wait...".

I added some user code to the module, to WaitFor this text to dissappear, with a time out value of 30 seconds.

When I run it, it just returns OK.

Surely this is incorrect. The message still sits on the screen - it hasn't gone away.

Code: Select all

try
        	{
        		Report.Log(ReportLevel.Info, "Wait", "Waiting 30s for item 'Android365Agile.N365AgileAndroidApplication.SendingRequestPleaseWait' to not exist.", repo.Android365Agile.N365AgileAndroidApplication.SendingRequestPleaseWaitInfo, new ActionTimeout(30000));
            	repo.Android365Agile.N365AgileAndroidApplication.SendingRequestPleaseWaitInfo.WaitForNotExists(30000);
        	}
        	catch(RanorexException re)
        	{
        		Report.Failure("Ranorex Exception: "+re.ToString());
        	}
I would have expected it to have failed. Am I not understanding this correctly?

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

Re: WaitFor NotExists does nothing?

Post by odklizec » Tue Jul 12, 2016 10:06 am

Hi,

Please post a Ranorex snapshot of the app in question, taken when the message is displayed. Then post also the xpath of message stored in repo. If waitfor notexists says the element does not exists, then it most probably does not exists at a time the command is used. Try the xpath from repo in standalone spy.
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

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: WaitFor NotExists does nothing?

Post by stapes » Tue Jul 12, 2016 10:11 am

"Try the xpath from repo in standalone spy" - that is where I got the Repository path from in the first place.

I think it would be difficult to reproduce this error for you.

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

Re: WaitFor NotExists does nothing?

Post by odklizec » Tue Jul 12, 2016 12:13 pm

The thing is, that without at least snapshot and xpath, there is definitely nothing I or anyone else here can do for you. My guess is that the xpath you stored in repo is different than the actual xpath of the message (either due to dev. changes or dynamic nature of stored xpath). This is why I've asked for snapshot and xpath.
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

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: WaitFor NotExists does nothing?

Post by stapes » Tue Jul 12, 2016 1:57 pm

It is a fairly rare occurrence. I will put the snapshot in the code there so that if and when it reoccurs I will have something to send you.

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

Re: App get crashed while tap on element in iOS Instrumented app

Post by odklizec » Tue Jul 12, 2016 2:27 pm

Do you start the waitfor action right after initiating the action, which starts the 'please wait' message? This could explain the 'rare' occurence of the issue. You see, if the waitfor 'notexists' is started before the "please wait" message is actually started/loaded, this is why waitfor notexists returns OK. Try either add a 'delay' or wait for 'exists' before 'not exists' action.
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