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

Tool doesn't wait for the entire page to load.

9 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shruti
Top achievements
Rank 1
Shruti asked on 23 Aug 2012, 07:58 AM
Hello All,

I am using Test studio to test my website.
One of the major problems that I encountered is that the tool doesn't wait for the entire page to load.

The scenario I am recording is as:

My site contains a number of assignments which a user(instructor) can edit.
I have to click on edit link for a particular assignment after which the assignment page loads in which  I have to edit an instruction(click a button) and changes instruction text(change value in a textbox).

The problem is that after I click "edit assignment button", It takes some time(10-25 seconds) to load the page.If I do not specify any delay in the script , the tool tries to click the edit instruction button before the page loads completely. also, It's strange that the tool somehow shows that the button is clicked(though it is actually not) and proceeds to next step(entering text in textbox) where it fails as I doesn't get any textbox(the textbox comes after clicking edit instruction button which was not actually clicked).
I have checked "SimulateRealClick" also.
I am not able to find out the reason for such behavior (the tool showing click action performed though it's not actually clicked).

IF I specify a sufficient delay before click step, It works correctly. But this delay concept doesn't work well everytime as the time the page takes to load may vary and to cater all cases, I cannot specify a long delay as It would cause unnecessary waiting. I am facing this similar problem at a number of other places also in the site.

Could anybody plz suggest if there is a generic solution for  this problem(not something like specifying delay or slowingdown the script) ? I want the tool to wait(or keep searching for the element)till the page is loaded completely.

Thanks and regards,
Shruti




9 Answers, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 25 Aug 2012, 12:53 AM
Hello Shruti,

Thanks for trying Test Studio. In order to understand why the test is registering the click action is successful, we will need to understand what the state of the DOM is at the time of the click action. It is possible that Test Studio is clicking the incorrect element.

In order to help with your issue, we need more information about your test scenario. Please provide us with a copy of your test and access to your application. Also, please provide your test log and a copy of the DOM at the time of failure. You can export these to file from the Visual Debugger and add them to a .zip archive. If it is not possible to grant us access to your application, please take a Fiddler trace and attach it to a support ticket in a zip file. If you are unfamiliar with how to do that please refer to this short video. You can download the Fiddler application from here. A Jing video demonstrating the issue may also help us to better understand what is happening. Thanks for providing the information we need to best advise you.

Regards,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Shruti
Top achievements
Rank 1
answered on 30 Aug 2012, 12:14 PM
Hello Byron,

Thanks for the reply.
It's not the case that Test Studio is clicking some incorrect element. If I copy the same step and paste it just below it, It works.
I noticed this case just a few days before when In my website, I had to enter values in 2 textboxes(say textbox1 and textbox2).
I had  recorded entering values in both the text boxes but while executing the test, test studio didn't actually enter value in textbox1 and proceeded to next step (entering value in textbox2). But in test result, It shows both the steps performed successfully(tick mark).

I copied the 1st step(entering value in first test box) and pasted it just below it, and it worked.
Also, It works well If I add some delay before performing the step.


As, this Problem can occur at any step during the test, It wont be a good idea to rely on adding delay.

Plz suggest if there is some generic solution for this problem.
0
Cody
Telerik team
answered on 30 Aug 2012, 07:44 PM
Hi Shruti,

Byron is on vacation, so I'm stepping in during his absence.

What you describe is a very common problem with test automation, that is synchronization with the web application. It is very easy for the test script to outrun the web application... to try to do this before it is actually ready for input or clicking on a button. The first thing to try is to set the Ajax Timeout value to something other than 0 (see attached screen shot) on those steps that cause a page change, such as clicking on a button that advances you from page 1 to page 2. The purpose of this timeout is to wait for any Ajax events to finish before proceeding on to the next test step. This is documented here.

Kind regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Shruti
Top achievements
Rank 1
answered on 31 Aug 2012, 07:52 AM
Hi Cody,

Thanks for the reply.
I tried changing the Ajax Timeout value to something other than 0(used 2000ms) but it didn't work for me.
The page is still behaving the same way. 



Regards,
Shruti


0
Cody
Telerik team
answered on 31 Aug 2012, 04:50 PM
Hello,

I'd like to look at this problem on your computer via GoToMeeting. Let me know what time zone you are in and your availability and I'll setup the meeting. I'm in Austin, TX which is Central Time (GMT -6). Note I won't be in the office on Monday due to national holiday.

All the best,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Shruti
Top achievements
Rank 1
answered on 04 Sep 2012, 09:12 AM
Hello Cody,

Thanks for the quick response.
We can have GoToMeeting tomorrow(Wednesday) at 7:30 p.m. IST (that will be around 9:00 a.m. in Austin, TX).
Please confirm if this time suits you as well.

Also, I would like to know about the future plans to provide support for recording in Firefox and Chrome.

Thanks and Regards,
Shruti
0
Cody
Telerik team
answered on 04 Sep 2012, 05:27 PM
Hi Shruti,

Can we do my 8:30am, your 7pm? I have another meeting at my 9:30am and I want to make sure we have enough time to study and hopefully solve this issue for you. I am sorry that GoToMeeting does not have a phone number in India for you to call.

1.  Please join my meeting, Wednesday, September 05, 2012 at 8:30 AM Central Daylight Time.
https://www2.gotomeeting.com/join/662788802

2.  Use your microphone and speakers (VoIP) - a headset is recommended.  Or, call in using your telephone.

Dial +1 (773) 897-3015
Access Code: 662-788-802
Audio PIN: Shown after joining the meeting

Meeting ID: 662-788-802

GoToMeeting®
Online Meetings Made Easy™


Greetings,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Shruti
Top achievements
Rank 1
answered on 05 Sep 2012, 05:49 AM
Hi Cody,

7 pm is fine.

Thanks and Regards,
Shruti
0
Cody
Telerik team
answered on 05 Sep 2012, 02:52 PM
Hello Shruti,

Just a quick summary of our meeting today:
  • We were able to solve the synchronization problem by adding a "Wait For Text..." test step.
  • While this approach does work on specific instances it is depended on which skill is added. Long term you need a synchronization solution that does not depend on any specific skill, an approach that will work no matter which skill was added to any particular step.
  • To figure out how to accomplish this goal we need direct access to your application so we can study it in detail, including how the DOM works internally in the browser. This is a time consuming task that cannot be accomplished during an online meeting.
  • Instead of direct access, we might be able to use a Fiddler trace from you of your application running and use that. We've had a 50% success rate using Fiddler traces to reproduce customer problems and come up with solutions.
  • I also explained we are evaluating the level of effort required to record in alternate browsers. We have not yet decided when or if we will do this.
  • To convert an entire test to code requires using our Visual Studio plug-in. The Standalone version does not have this feature. This conversion is a one-way conversion. You cannot convert it back into a Test Studio test. NOTE: you can load the same Test Studio tests in either the Standalone version of using our plug-in. They are 100% compatible and interchangeable. 

I await word on whether or not you will be able to provide me direct access to your application being tested.

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