Element Not Found.

2 posts, 0 answers
  1. abhishek
    abhishek avatar
    1 posts
    Member since:
    Jul 2016

    Posted 03 Oct 2016 Link to this post

    Hi All

    I am using Telerik Test Studio for Automation Testing . I am facing issue related to "Element no found" .

    I have added element ("Gateway Name") in the DOM and object that needs to be identified is available in one of the Cell, after rebuild project .. I run my test cases and I am getting an error "element not found".

    Is there any other way to store element permanently in the DOM because I have added "Gateway Name" element so many times in the DOM.

    Please provide the solution for identifying these dynamic objects


  2. Boyan Boev
    Boyan Boev avatar
    1072 posts

    Posted 06 Oct 2016 Link to this post

    Hello Abhi,

    Let me explain how Test Studio locates an element. Test Studio uses an intelligent element identification scheme to auto-generate find expressions. When an element is ready to be added to the Elements Explorer, Test Studio tries to use the first item in the list (usually "id"). Using this criteria, if the item is unique for the entire page, the element is added, a find expression is created, and Test Studio stops evaluating.

    However if some of the attributes in the find expression is dynamically generated and constantly changes with every reloading of the page Test Studio cannot find it anymore. When you record the element again Test Studio will add a new element because it has changed find criteria already. 

    In order to overcome this change how the element is found. You should create a find expression only with static find rules (e.g. TextContent, ID e.t.c.).

    Let me know if that helps. 

    Boyan Boev
    Telerik by Progress
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top