Forum Discussion

LOrban's avatar
LOrban
Occasional Contributor
10 years ago
Solved

Best practices for Scripting

Hi All, Being new with TC scripting technologies (however long time programmer), I’m trying to clarify the best practice to test web applications with JScripts. Consequently I woul...
  • Philip_Baird's avatar
    10 years ago
    Hi László, using a combination of JScript Constructors and the Test Complete Page Object, it is possible to approximate the Selenium Page Object pattern.




    This provides the benefits of:



    1. Single point of contact to Page elements, if an element on a page changes, only a single point in the code needs changing to reflect the change. 


    2. Abstracting Page and Element interaction away from Test Scripts, Test Scripts need only know how to use a Page Object, the detail of addressing a Page element is hidden away making simplifying Test Scripts.


    3. Promotes re-usability



     


    For mine, this is the minimum standard to adhere to when writing automated Test Scripts for Browser applications. In fact, I use similar patterns for testing Windows forms applications.


     


    Regards,


    Phil Baird