Maintainability of the scripts in Telerik

2 posts, 0 answers
  1. Ahetejazahmad
    Ahetejazahmad avatar
    3 posts
    Member since:
    Aug 2011

    Posted 20 Oct 2011 Link to this post

    Hi,
       I want to know how Telerik Test Studio will handle these scenario.
    1. Assume  today in a web page: I have two text box (T0, T1) which is not assigned  ID, Name or Any other thing.Both have same properties except for the location.
    2. At certain places we see the recorded steps shows Test0,Test1 as the Friendly Name of object.We add validation for these objects to be present on the page in our script. Suppose if some more text boxes are added above T0 and T1 and target order changes then will our script fail? If yes then whats the best way to add such validation which are irrespective of their location and order.

    Basically we want to check the maintainability of the scripts in Telerik. Let us know if you have document or a reference which can help us in evaluating the same.

    A quick response will surely help.

    Thanks & Regards,
    Ahetejazahmad.
  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 20 Oct 2011 Link to this post

    Hello Ahetejazahmad,

    Unfortunately there's no simple answer to your question. It depends on exactly what Find Expression Test Studio put together for locating that element. There are probably a thousand different ways for locating the same element within the DOM, even with DOM that doesn't change. There's by tag index, by text content, by path, etc. We have to study the specific find expression for a specific element to know exactly how fragile it may be.

    You do risk the reliability of the test automation when you do not have unique ID's or names attached to the elements. We realize there are cases this is not possible, especially if you're using third party controls on your web page. In such cases we recommend adding unique ID's to the complex control (e.g. a calendar popup) such that we can use that in a "chained expression". A chained expression means find element A (the one with the unique ID) then find element B underneath it, possibly by text content or tag index or whatever we can determine is going to be the most reliable. This often means hand crafting your own find expression such that it's smarter than the default find expression that Test Studio built during recording.

    Greetings,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top