Page 1 of 1

WaitFor NotExists does nothing?

Posted: Tue Jul 12, 2016 9:44 am
by stapes
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?

Re: WaitFor NotExists does nothing?

Posted: Tue Jul 12, 2016 10:06 am
by odklizec
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.

Re: WaitFor NotExists does nothing?

Posted: Tue Jul 12, 2016 10:11 am
by stapes
"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.

Re: WaitFor NotExists does nothing?

Posted: Tue Jul 12, 2016 12:13 pm
by odklizec
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.

Re: WaitFor NotExists does nothing?

Posted: Tue Jul 12, 2016 1:57 pm
by stapes
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.

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

Posted: Tue Jul 12, 2016 2:27 pm
by odklizec
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.