Micro Focus QTP (UFT) Forums
Gain data from a webtable inside a webtable - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Gain data from a webtable inside a webtable (/Thread-Gain-data-from-a-webtable-inside-a-webtable)



Gain data from a webtable inside a webtable - AndyM - 07-11-2018

Good afternoon folks,

I am trying to find the answer to my question but have struggled for the past 2 weeks.

My situation is I have a webtable that has a html id of table_295 in the OR but this ID changes everytime the developers rebuild the website so instead of having to change this everytime I was trying to find something that was stationary. Using the object spy if I go up a couple of levels I have a more permanent way of identifying the area of the website that I want to test but i don't understand childobjects enough to make it work.


What I would like to know is can you gain information from a Webtable that is inside of a webtable ?

Thank you in advanced

Andy


RE: Gain data from a webtable inside a webtable - Ankur - 07-12-2018

How many webtables do you have in th page?

  1. Try to get all child objects of the Page objects and filter by WebTable.
  2. Identfy the WebTable you are looking for.
  3. Grab the unique id dynamically.
  4. and use this dynamic value to identify the table. Your script thus becomes independent of change in id.