? QA Design Gurus: Telerik Test Studio Tip: Be cautious and specific about adding elements in Element Repository

Jul 21, 2015

Telerik Test Studio Tip: Be cautious and specific about adding elements in Element Repository

In my previous blog post, I described about Element repository.  As I mentioned there, Element Repository is global for entire project so we should have to be very cautious while adding elements in Element Repository. I would really suggest don’t add the element in the Element Repository blindly which causes a lot of problems while your project is growing. Good practice is just to have a look on the identification logic once you add the element in the Element repository. Update Friendly Name and Identification logic if you feel it is more generic and causes problem in later stage. A small example is given below how it will it create unknown problems:

Assume , we have a page which contain two span blocks of same Text Content but are there in two different div’s. 

<div id="id1">
.............
<span>Example</span>
  .......
</div>
........
<div id="id2">
<span>Example</span>
......
</div>


Assume, It has taken Text Content as identification logic while adding first span in to Element Repository, but we haven’t updated identification logic and used it in verification step. At present our test step is success because we have an element in DOM. In later time if the first span is removed from the DOM, still test step become success because we have another span which matches identification logic (TextContent=”Example1”). So best practice is, Edit the identification logic and make sure that div should be part of element identification logic while adding element in Element Repository.   

No comments:

Post a Comment