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

Issue with page content type

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Frustrated
Top achievements
Rank 1
Frustrated asked on 03 Mar 2012, 07:35 AM
Hi,

We were asked to perform functional test using QTP on an internally developed application. Currently, we are facing difficult time with the content type for return page. QTP consultant told us the issue we are facing was due to the wrong content type in the return page from the Telerik controller used in the code.

We are using the AJAX controls and Telerik always return content type of text/javascript for page with mixture of html and javascript. Someone told us the the correct content type should be text/html for this scenario.  

Is this a bug of Telerik? What we should do in order to get the correct content type?

By
Frustrated QA

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Mar 2012, 10:58 AM
Hello,

The content type is not controlled by the control itself but is configured on the server. Another approach is to force the content type of the page by importing the following meta tag:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
or via the codebehind as shown in the following MS article Response.ContentType.

Please keep in mind that our controls contain a lot of dynamically generated HTML and a rich client-side API, so for a testing environment to be able to work with them it is crucial that it works well with dynamic HTML and JavaScript. From what I see in the net QTP  has issues with identifying dynamic objects.

A common solution that different authors offer is enabling Smart Object Identification (here is one example and here or here you can find more detailed information on the way it works). I can also suggest you examine this blog for a list of steps that may help you execute your test properly. You can also try the QTP user guide and perhaps more precisely the advanced features section and its configuring object identification subsection. I believe this blog may also be helpful in this line of thoughts. If you still experience problems with Telerik controls, ask the QTP support for further help.

To ease working with dynamic objects we also offer a free edition of the Telerik Testing Framework which can help you automate AJAX, Silverlight and WPF applications using coded steps. Its online documentation will help you get started. The benefit from using the Telerik testing environment is that it is specially tailored to work with our controls. You may also be interested in the Ultimate collection as it includes a license for all our developer tools plus the testing environment. More information on the individual prices and options is available here.

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
Frustrated
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or