Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Object Names
#1
Solved: 11 Years, 4 Months ago
Hi,
I have a page which contains WebRadioGroup objects. The Object name for each object is Dynamic though so everytime the page is loaded the object name will be different, which causes my scripts to fall over. How do I reference these dynamic objects?

Thanks
Tom.
Reply
#2
Solved: 11 Years, 4 Months ago Cool 
You can try this piece of code:
I had a similar problem and these steps resolved it.
Capture the WebTable in your Object repo.Then Use child Objects method and retrieve the dynamic value of the radio button.
In the last step , i have mentioned <#0> , meaning select first radio button.You can specify as you need .
set
Code:
WebRadioGroupname=Browser("Browsername").Page("Pagename").WebTable("Tablename").ChildItem(<RowCount><Column Count>,"WebRadioGroup",<Index>)
ab= WebRadioGroupname.GetRoProperty("name")
Browser("Browsername").Page("Pagename").WebRadioGroup("RadioGrpLogicalNameFromObjectRepo").SetTOProperty "name",ab
Browser("Browsername").Page("Pagename").WebRadioGroup("RadioGrpLogicalNameFromObjectRepo").Select "#0"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT issues with Outsystems dynamically generated Id/names jherron 2 1,364 03-02-2020, 09:33 PM
Last Post: Swishy70
  Object Name Is Also A Dynamic Value zunebuggy 0 1,147 05-16-2017, 09:53 PM
Last Post: zunebuggy
  Comparing two excel Sheets whose columns names vary Divya Roopa 2 8,654 03-26-2014, 07:20 PM
Last Post: Parke
  Dynamic Object creation rjkmr.aiht 2 2,708 09-01-2012, 12:32 PM
Last Post: basanth27
  Count number of webelement with specific names kalaivanan123 2 4,651 07-31-2012, 11:52 AM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)