This is a migrated thread and some comments may be shown as answers.

AJAX call which invokes a custom servlet

9 Answers 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mercedes
Top achievements
Rank 1
Mercedes asked on 09 Jan 2013, 06:37 PM
Hi,
      My application has an Effective Date field and and Expiration Date field. The Expiration Date field is set to the Effective Date plus one year by an AJAX call which invokes a custom servlet. When i navigate manually through the webpage, the AJAX call is invoked but the AJAX call does not get invoked through Test Studio and the expiration date is not being calculated. How do i invoke the AJAX call to invoke the expiration date?

Thanks

9 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 10 Jan 2013, 09:25 AM
Hello Brian,
try setting some of your steps (particularly the ones that are supposed to trigger in-browser events) to SimulateRealClick/Typing:
http://www.telerik.com/automated-testing-tools/blog/stoil-stoichev/12-09-04/regular-vs-simulated-clicks.aspx

Let me know how it goes.

Kind regards,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mercedes
Top achievements
Rank 1
answered on 10 Jan 2013, 03:53 PM
I tried setting the step to SimulateRealClick/Typing but that did not work for me. I even tried putting in delays to see if test studio is running faster than the application can respond but that did not work either.

Thanks
0
Stoich
Telerik team
answered on 15 Jan 2013, 10:41 AM
Hi Brian,
I'm surprised this didn't work.

It's going to be hard to assist you effectively without direct access to your application. Is you application publicly accessible? If you just let me know where to find the control in questions and I'll make the automation work for you. Let me know if you would like me to drop you an email so that you may share the application with me privately (and not on this public message board).

Some things to try:
try to determine what the specific events are with this tool:
http://www.telerik.com/automated-testing-tools/blog/stoil-stoichev/12-11-16/use-visual-event-to-explore-javascript-events-in-your-application.aspx

Try to fire the events in a coded step like so:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/write-tests-in-code/advanced-topics/javascript/javascript-events.aspx

You can even try recording Tab clicks after the Typing steps (helps to fire onchange event somtimes).

If none of this helps and we can't access your application - then we might have to jump in a meeting so that we may get this working directly on your machine via screensharing.

Let me know.

All the best,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mercedes
Top achievements
Rank 1
answered on 15 Jan 2013, 07:16 PM
The application is internal for our company. Please let me know if you can assist me through screen sharing and direct access to my application.

Thanks
0
Stoich
Telerik team
answered on 18 Jan 2013, 03:26 PM
Hi Brian,
yes, please let me know what you're availability is and I will send you a meeting request. My timezone is GMT +2:00. So something that corresponds to your morning will probably work best.

We use GoToMeeting - you will not need to install anything beforehand.

Hope to hear from you soon.

Kind regards,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mercedes
Top achievements
Rank 1
answered on 18 Jan 2013, 03:54 PM
Hi Stoich,
       I am in GMT - 5, so i think it would be best to schedule the webex on Tuesday Jan 22nd as i will be out of office on Monday. Please let me know your availability.

Thank you,
Nithin
0
Stoich
Telerik team
answered on 22 Jan 2013, 01:51 PM
Hi Nitin,
unfortunately I saw your reply too late. I've went ahead and sent you the requested for tomorrow (Jan 23nd)
I hope the proposed time will work for you. Go ahead and update the meeting request if it doesn't.

Hope to hear from you soon.

Greetings,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mercedes
Top achievements
Rank 1
answered on 22 Jan 2013, 02:08 PM
Hello Stoich,
     I did not get any meeting requests from you. Can you please re-send the meeting request?

Thank you,
Nithin
0
Accepted
Stoich
Telerik team
answered on 23 Jan 2013, 04:35 PM
Hello,
to sum up our GoToMeeting: you were skipping the selection from a calendar control by directly typing in the desired data into an Input field. Unfortunately this had an unintended effect: on playback an ajax event that is supposed to add a second Date input to the page was not fired.

And our test was failing when the application couldn't find this second Date field. The resolution was to record the complex action of opening the Calendar control and making the date selection from there. Then we used a Data-driven Find Logic so that we can data-driven the selection:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/data-driven-find-expressions.aspx

Kind regards,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Mercedes
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Mercedes
Top achievements
Rank 1
Share this question
or