Testing Kendo ListView with Kendo Editor on "New" form

4 posts, 1 answers
  1. Kyle Smith
    Kyle Smith avatar
    42 posts
    Member since:
    Feb 2012

    Posted 10 Jun 2015 Link to this post

    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>

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 10 Jun 2015 Link to this post

    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!
  3. Kyle Smith
    Kyle Smith avatar
    42 posts
    Member since:
    Feb 2012

    Posted 11 Jun 2015 in reply to Cody Link to this post

    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!

  4. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 11 Jun 2015 Link to this post

    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!
Back to Top