Record Alert Response

4 posts, 1 answers
  1. Corina
    Corina avatar
    17 posts
    Member since:
    Feb 2013

    Posted 28 Mar 2013 Link to this post

    Hello,

    I am trying to test the Grid Batch Editing feature from Kendo UI (I am using Kendo UI default examples). I am performing a simple test of opening it and deleting the first element. When I press delete, a popup alert appears which asks if I am sure that I want to delete the element or not. How do I record pressing the "Ok" button from the alert? Test Studio does not record it automatically.

    Regards,
    Corina
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 28 Mar 2013 Link to this post

    Hello Corina,

    Actually it is a Confirm dialog and as you can see in this video when I click on the OK button Test Studio successfully creates a "Handle 'Confirm' dialog" step. The only tricky thing here is that you need to add the Button manually to the Elements Explorer and add a click step from the step suggestion as seen in the video. This is because it is a child element of the Kendo Grid Cell. I have attached the sample test from the video. Please give it a try and let me know if you need further assistance on this.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Corina
    Corina avatar
    17 posts
    Member since:
    Feb 2013

    Posted 28 Mar 2013 Link to this post

    And how about the popup windows that appear, for example, when trying to add a new item in Grid - Popup editing? I tried to create a test where I add an item, and I tried two ways: first just clicking and inserting everything manually, and the second bu adding the elements to the element explorer, and adding events from there. Neither worked. Could you please help me here?
  4. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 29 Mar 2013 Link to this post

    Hi Corina,

    The problem is that these elements don't have unique attributes with higher priority in the Identification Logic list and Test Studio uses their dynamic TagIndex attribute to identify them. To overcome this, you can either edit the Find Settings for these elements so they're located with a static attribute(which is non-dynamic and unique) or you can add a new Tag in the priority list(e.g. XPath) as seen in this video.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top