Page 1 of 1

Ajax Calls

Posted: Fri Jul 12, 2013 3:18 pm
by TDCINick
Hello, On our web page we have a text box that when focus is lost it should trigger a ajax call to post the data. Sometimes this does not happen. I am using ranorex to click into the text box, type the value, then pressing tab to lose focus. It works some times and other times it does not. I have tried chrome and IE both have the issue but happens less in IE. I have tried on server 2008 R2, windows 7 and windows 8 and saw the issue there. I am using Ranorex 4.0.4 on all the machines. I have tried changing from clicking in to the box to tabbing into the box and then clicking another field but it still occured. If I try to recreate this by manually following the steps that are in the test it does not happen. I am wondering if anyone else has had a similar issue or if you could recommend any possible. Please let me know if you need any other information.

I appreciate the help,
Nick

Re: Ajax Calls

Posted: Tue Jul 16, 2013 3:58 pm
by Support Team
Hello,

If I got this correctly you have already tried to click on another element after you typed in the value, right?
What happens if you would explicit set the focus on another element by using the "Invoke Action Focus"?
Do you know how your script checks if the focus is lost?
Are you sure this never happens when you manually do the steps?

Regards,
Markus

Re: Ajax Calls

Posted: Wed Jul 17, 2013 5:43 pm
by TDCINick
To answer your question about how we detect focus has been changed. The developer responded with "using jQuery we bind to the change event of the control$control.bind('change', function (E) { AutoSave(false); });"

Re: Ajax Calls

Posted: Thu Jul 18, 2013 4:12 pm
by Support Team
Hello,

Thanks for answering that question, but could you please also answer the other ones?

Thanks,
Markus

Re: Ajax Calls

Posted: Fri Jul 19, 2013 8:39 pm
by TDCINick
I am using the invoke focus option now and seems to have solved the problem. I am going to attempt to run them multiple times and see what happens.

As for manually recreating the issue. I was not able to recreate the issue unless ranorex had ran through and the issue started. Was able to see the focus issue after that point manually.

Re: Ajax Calls

Posted: Tue Jul 23, 2013 3:57 pm
by Support Team
Hello,

Thanks for the information!
We are glad to hear that you found an issue in your web page.

Regards,
Markus