SlideShare a Scribd company logo
How to handle Dynamic Objects with OpKey ?
While automatingawebapplication,quite often youmighthave experiencedfailureof yourtestcases
duringtheirexecutiondue to changedpropertiesof dynamicobjectsfetchedinyourObject Repository.
These dynamicobjectsoftenchange theirpropertiessuchasname, id,value etc.
To handle these dynamicobjects,youcanuse ‘Is Regex’feature
The followingillustrationwill explainaboutdynamicobjects andthe usage of ‘Regex’.Here I’musinga
website inwhichthe name propertyof ‘Name’editbox usuallychangeswheneverIlaunchthatpage
again,whichmeansmytest casesforthis page wouldfail due tothose changes.So,I will be using
‘IsRegex’which will handle the changesin the name propertysothatmy testcasesdon’tget affected.
In the followingscreenshot,while fetchingthe objects of awebsite,Igotthe followingproperties
Screen shot 1
The above ‘Screen shot 1’ shows the window of ‘Import from Application’ where I’ve fetched
the ‘Name’ text field.
Properties are shown in the following screen shot
Screen shot 2
In above screen shot you can see the Object Properties, in the ‘name’ field value is as
‘ctl00$ContentPane$ctl00$Name55’.
Now if I again fetch the properties of ‘Name’ edit box of that webpage, I will get the following
properties
Screen shot 3
In above screen shot you can see the Object Properties, in the ‘name’ field value is as
‘ctl00$ContentPane$ctl00$Name87’.
Similarly if I fetch again the properties of ‘Name’ edit box of that webpage, ‘name’ field value is
‘ctl00$ContentPane$ctl00$Name90’.
This clearly implies that during execution of my test cases, the ‘name’ field value will change
again.
Now, to handle these changes I will use ‘Is Regex’ which will handle the above changes.
Now, after fetching the object, now observe the following screenshot
Screen shot 4
Screen shot 5
The above screen shot 3 shows the view of Object Repository window and screen shot 4 shows
the view of ‘Properties’. In screen shot 4 you can also see ‘Is Regex’. Now, in my case the
‘name’ field value are as ‘ctl00$ContentPane$ctl00$Name55’
‘ctl00$ContentPane$ctl00$Name87’, ctl00$ContentPane$ctl00$Name90’. On observing these
field values you will observe only last two values are changing else everything is same.
So, I will rename the value of name in ‘Properties Window’ as
‘ctl00$ContentPane$ctl00$Name’ and I will check the checkbox corresponding to the name
property. Following screen shot will make it clearer to you
Screen shot 6
In the above screen shot 6, I have changed the value of ‘name’ to
‘ctl00$ContentPane$ctl00$Name’ and I’ve checked the checkbox under ‘Is Regex’
corresponding to the name property.
Now you can save your files and execute your test cases.

More Related Content

PDF
Deep Dive into React Hooks
PDF
Testowanie JavaScript
PDF
React new features and intro to Hooks
PPT
Timedobserver
PDF
Mobx Performance and Sanity
PDF
Mobx - performance and sanity
PDF
The basics of Ember Objects
PPT
Position
Deep Dive into React Hooks
Testowanie JavaScript
React new features and intro to Hooks
Timedobserver
Mobx Performance and Sanity
Mobx - performance and sanity
The basics of Ember Objects
Position

What's hot (15)

PDF
PPT
Ext Js Events
PDF
Data binding in AngularJS, from model to view
DOCX
VBA Coding for Word to Numeric
PPTX
Knockoutjs Part 2 Beginners
PPT
Χρήση Vba για την πρόσβαση σε βάση δεδομένων
PDF
Swift ui userinput
PDF
 Mwa class custom_files
PPTX
Oracle: Functions
KEY
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
PDF
Some Stuff I was thinking about state machines and types
ODP
Android tutorials8 todo_list
PDF
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
PDF
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheet
PDF
redux and angular - up and running
Ext Js Events
Data binding in AngularJS, from model to view
VBA Coding for Word to Numeric
Knockoutjs Part 2 Beginners
Χρήση Vba για την πρόσβαση σε βάση δεδομένων
Swift ui userinput
 Mwa class custom_files
Oracle: Functions
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
Some Stuff I was thinking about state machines and types
Android tutorials8 todo_list
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheet
redux and angular - up and running
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
NewMind AI Monthly Chronicles - July 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Big Data Technologies - Introduction.pptx
Ad

How to handle Dynamic Objects with OpKey?

  • 1. How to handle Dynamic Objects with OpKey ? While automatingawebapplication,quite often youmighthave experiencedfailureof yourtestcases duringtheirexecutiondue to changedpropertiesof dynamicobjectsfetchedinyourObject Repository. These dynamicobjectsoftenchange theirpropertiessuchasname, id,value etc. To handle these dynamicobjects,youcanuse ‘Is Regex’feature The followingillustrationwill explainaboutdynamicobjects andthe usage of ‘Regex’.Here I’musinga website inwhichthe name propertyof ‘Name’editbox usuallychangeswheneverIlaunchthatpage again,whichmeansmytest casesforthis page wouldfail due tothose changes.So,I will be using ‘IsRegex’which will handle the changesin the name propertysothatmy testcasesdon’tget affected. In the followingscreenshot,while fetchingthe objects of awebsite,Igotthe followingproperties Screen shot 1
  • 2. The above ‘Screen shot 1’ shows the window of ‘Import from Application’ where I’ve fetched the ‘Name’ text field. Properties are shown in the following screen shot Screen shot 2 In above screen shot you can see the Object Properties, in the ‘name’ field value is as ‘ctl00$ContentPane$ctl00$Name55’.
  • 3. Now if I again fetch the properties of ‘Name’ edit box of that webpage, I will get the following properties Screen shot 3 In above screen shot you can see the Object Properties, in the ‘name’ field value is as ‘ctl00$ContentPane$ctl00$Name87’. Similarly if I fetch again the properties of ‘Name’ edit box of that webpage, ‘name’ field value is ‘ctl00$ContentPane$ctl00$Name90’. This clearly implies that during execution of my test cases, the ‘name’ field value will change again. Now, to handle these changes I will use ‘Is Regex’ which will handle the above changes.
  • 4. Now, after fetching the object, now observe the following screenshot Screen shot 4 Screen shot 5 The above screen shot 3 shows the view of Object Repository window and screen shot 4 shows the view of ‘Properties’. In screen shot 4 you can also see ‘Is Regex’. Now, in my case the ‘name’ field value are as ‘ctl00$ContentPane$ctl00$Name55’ ‘ctl00$ContentPane$ctl00$Name87’, ctl00$ContentPane$ctl00$Name90’. On observing these field values you will observe only last two values are changing else everything is same.
  • 5. So, I will rename the value of name in ‘Properties Window’ as ‘ctl00$ContentPane$ctl00$Name’ and I will check the checkbox corresponding to the name property. Following screen shot will make it clearer to you Screen shot 6 In the above screen shot 6, I have changed the value of ‘name’ to ‘ctl00$ContentPane$ctl00$Name’ and I’ve checked the checkbox under ‘Is Regex’ corresponding to the name property. Now you can save your files and execute your test cases.