Opkey logo

How to Handle Dynamic Objects With Opkey Using Is Regex?

May 19, 2017
/
Iffat Ara Khanam

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 successfully without getting failed.

Portrait of a woman wearing a beige embroidered top.

Iffat Ara Khanam

Technical Content Lead

Iffat is the content lead at Opkey. She has expertise in writing technical content focused around ERP testing, Cloud apps, automation and other IT related topics. She has rich experience in writing content for marketing collateral like whitepapers, case studies, newsletters etc. which helps in funnel creation for sales.

Featured Content

Post

Redwood Is Oracle’s Future—Here’s How to Get There Faster, Smarter, and Without the Risk

Oracle Redwood UX is emerging as the centerpiece of Oracle’s vision for truly intelligent, user-first enterprise software. By 25C, Redwood will be the default cockpit for the HCM Fusion Cloud Pillar, with others to follow (SCM, ERP, and CX). As a result, organizations seeking a competitive edge are already aligning resources, timelines, and change-management plans. Learn how Opkey & Huron's partnership can help you make the most of Oracle Redwood.

Discover what Opkey can do for you.