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

Testing Kendo ListView with Kendo Editor on "New" form

3 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kyle Smith
Top achievements
Rank 1
Kyle Smith asked on 10 Jun 2015, 12:19 PM

Hi there,

I'm evaluating Test Studio for our company's testing needs, and have a question about a specific test scenario.

I'm trying to record a test involving adding an item to a Kendo List View that has a Kendo Editor defined in its edit template. I am unable to get the "click" or "typing" into the editor to be recorded as part of the test. All other aspects of the test scenario (typing into other kendo controls on the edit form, clicking submit, etc) are recorded and execute as expected.

I am using the Kendo ASP.NET MVC Wrappers (2014.3.1411) and recording tests in Internet Explorer 11.

My list view editor template is defined as

<div class="k-edit-form-container">
 
    @( Html.Kendo().EditorFor(i => i.Body)
        .Tools(tools =>
        {
            tools.Clear();
            tools.Formatting();
            tools.Separator();
            tools.Bold();
            tools.Italic();
            tools.Underline();
            tools.SuperScript();
            tools.SubScript();
            tools.Separator();
            tools.JustifyLeft();
            tools.JustifyCenter();
            tools.JustifyRight();
            tools.JustifyFull();
            tools.Separator();
            tools.InsertUnorderedList();
            tools.InsertOrderedList();
            tools.Indent();
            tools.Separator();
            tools.CreateLink();
            tools.InsertImage();
        }).StyleSheets(style =>
        {
            style.Add("/Content/BasicStyles.css");
        }))
 
    <br /><br />
 
    <div class="edit-buttons">
        <a class="k-button k-button-icontext k-update-button" href="\\#"><span class="k-icon k-update"></span>Save</a>
        <a class="k-button k-button-icontext k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span>Cancel</a>
    </div>
 
</div>

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 10 Jun 2015, 06:28 PM
Hello Kyle,

I'm sure there's a way to overcome the recording and playback problem. However the Test Studio technical support are not web developers, we don't know how to put your code snippet into a working project. Could you send us a sample web project that demonstrates the problem? We know enough to load it and run it in Visual Studio, just not create it from scratch.

I also tried reproducing any problem using our online Kendo Editor demo. However Test Studio is recording this one perfectly. Once I'm able to reproduce your problem on my computer I can determine how to overcome it and send you the solution.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Kyle Smith
Top achievements
Rank 1
answered on 11 Jun 2015, 12:53 PM

Hi Cody,

Thank you for your prompt response. I've created a sample web project that includes a Kendo List view using a Kendo Editor in its edit form as I described. I was unable to attach it here as it is larger than 2MB. I created a support ticket (Ticket ID
943470) and attached the sample project to it.

Thanks!

0
Accepted
Cody
Telerik team
answered on 11 Jun 2015, 10:23 PM
Hi Kyle,

Thanks got it and send you the answer in your support ticket. For the benefit of the rest of the people monitoring this thread here's a copy of the response:

Thank you for the sample project. I was successful in getting it to run and demonstrate the problem you are describing. For me Test Studio is recording a click on BODYTag as shown in the first attached screen shot.

After studying the DOM that is generated by this web application, it's actually expected that Test Studio will not record into the edit field. The reason is that Test Studio is programmed to only record typing into actual <input> elements. This is a <body> element instead. What's happening under the cover is that JavaScript is intercepting all of the keystrokes, processing them then updating the <body> tag with the results.

To overcome this you'll need to add a coded step after the Click BODYTag  to type in the text for you like this:

Manager.Desktop.KeyBoard.TypeText("Descript of the new entry");


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Kyle Smith
Top achievements
Rank 1
Answers by
Cody
Telerik team
Kyle Smith
Top achievements
Rank 1
Share this question
or