Does changing DOM element properties break existing script commands?

2 posts, 0 answers
  1. Dan
    Dan avatar
    18 posts
    Member since:
    Mar 2016

    Posted 25 Oct 2017 Link to this post

    Hi,

    While creating a new script where the controls are all on the same page and identical in basic functionality, I found an element in the script that was simply ignored, while all others were worked as expected.
    I asked the DEV to look into the issue and she indicated that the title property was null. 

    After she fixed that, I found that my script still did not execute a click event.
    I unchecked the line from my script and re-added the element, and now the click event works like the others.

    On the face of it, the change (adding a title property value) doesn’t seem significant enough to break my original command.
    Here are the original and updated lines from the DOM
    Original:               <a title="" href="https://someURL.com/resources/3077">FAQ</a>
    Updated:             <a title="FAQ" href="https://someURL.com/resources/3077">FAQ</a>

    To get a better understanding of what’s happening (and so that I can convey this to my DEVs), my questions are:
    1.  Are script elements:
    --Static (i.e., once an element has been created, any DOM changes require a new element to be added to replace the original element) OR
    --Dynamic (i.e., the script command still points to the correct element and automatically picks up any changes)
    2.  Does changing a property (adding a value, e.g., “FAQ”) break an existing element or its script line?
    3.  Does re-ordering an elements properties render the existing script command obsolete (i.e., the underlying metadata (signature) no longer matches with the original command or element)?
    4.  Is there anyway of inspecting the element to see its properties (I’ve selected the element, rt-clicked, and selected Properties, but nothing happened.):
    --If so, is there any way to edit these elements in-line, without the need for manually re-adding the element?  

    Thanks much,
    Dan

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 26 Oct 2017 Link to this post

    Hi Dan,

    Thank you for the detailed description you've shared. 

    The elements in Test Studio are located on the page with a find expression which is built based on its properties. It is recommended to use some unique identification of elements like id or text content, etc. The recording find logic could also rely on any custom tags set for the elements. 

    In addition you could also modify the find expression of the already existing elements in the elements repository. 

    I hope these articles will bring some further understanding for you. Though if you would need any further assistance please do not hesitate to contact me again. 

    Thank you in advance for the cooperation! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top