Test Accelerators       Oracle Fusion  |  Oracle EBS  |  Salesforce  |  Workday  |  Trackwise  |  Kronos  |  All

OpKey Blog

How to handle Dynamic Objects with OpKey using Is Regex?

Radhe Shyam Prajapati 19.05.2017

While automating a web application, quite often you might have experienced failure of your test cases during their execution due to changed properties of dynamic objects fetched in your Object Repository. These dynamic objects often change their properties such as name, id, value etc. In order to handle these dynamic objects, you can use ‘Is Regex’ feature. Is Regex stands for Is Regular Expression.

A practical scenario: 

Suppose you are recording a test flow when name object value is vivek[1] but due to being dynamic in nature, its value get changed to vivek[2] at runtime. In such cases, your test execution get failed as it look for vivek[1] and the existing name object value is vivek[2].

Such scenarios can be easily handled by using the Is Regex feature of OpKey. Here in this scenario, vivek is the Regular Expression part which is static in nature.

  • Open your Object Repository and go to the Object Property value.
  • Check Is Regex checkbox corresponding to the dynamic object, to make the particular dynamic object value as Regular Expression.
  • Save the object.

Now during test execution, OpKey will look for the vivek value of dynamic object and will ignore the dynamic value. Your test execution will run sucessfully without getting failed.

Recent Posts

This site use Cookies to deliver our Service. By using this site you acknowledge that you have read and accepted Our Privacy and Cookie Policy. Your interest in OpKey or use of its free trial or purchase of a subscription package is subject to these Terms and Policies