? QA Design Gurus: Telerik Test Studio Tip: Use regular expressions for identifying dynamic pages, frames, elements

Jul 30, 2015

Telerik Test Studio Tip: Use regular expressions for identifying dynamic pages, frames, elements

Another challenge in automation is, handling elements whose identification logic will change dynamically. Assume the cases like, we are using URL for identifying page but some part of the URL is dynamic, we are using ID for identifying element but ID is appending with time stamp, frame name is dynamic. In such cases, it is recommended to use regular expressions in identification logic to identify multiple elements with same identification logic avoid duplication and reduce Element Repository size which ultimately reduces complexity.


How to update page identification logic with regular expression:
  1.  Go to Element Repository.
  2.   Select the page and right click.
  3.  Select Properties.
  4. In page properties, update corresponding filed with regular expression(Ex: BaseURL in below screenshot).
How to update frame identification logic with regular expression:
  1. Go to Element Repository.
  2. Select frame and right click.
  3. Select Properties.
  4. In frameinfo of properties, Update corresponding field with regular expression.(Ex: BaseURL and Name in below screenshot). 


How to update element identification logic with regular expression:
  1. Go to Element Repository.
  2. Select element and right click.
  3.  Select Edit Element.
  4. Select Find Without Connection.
  5. Enter property name and corresponding regular expression for property value.

No comments:

Post a Comment