Micro Focus QTP (UFT) Forums
Caption of the webedit changing - 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 Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: Caption of the webedit changing (/Thread-Caption-of-the-webedit-changing)



Caption of the webedit changing - gopimca5 - 06-03-2011

Hi,

The caption/text of the webedit is changing dynamically and we need to identify that webedit through QTP. How can we approach it?

Appreciate your reply.

Thanks,
Gopi




RE: Caption of the webedit changing - suresh vasu - 06-03-2011

You can identify the webedit object with its ordinal identifiers either with its index or location properties.

Thanks,
Suresh.


RE: Caption of the webedit changing - amitdbest - 06-03-2011

Use regular expression if Caption/text property not changing completely
EX.
Text value1 = User1234
Text value1 = User4321
you can user reg exp as User.*

Else you can go for ordinal property= index









RE: Caption of the webedit changing - gopimca5 - 06-07-2011

Thanks for the answers.

Is there any other technique apart from ordinal identifiers or regular expression?

Regards,
Gopi


RE: Caption of the webedit changing - cavinandan - 06-07-2011

You have to identify the properties which are not chaning every time. Now, add these properties to obeject repository. Side by side you have to remove the property which is changing every time (like in your case caption/text).

Also you can use descriptive programming to identify the object.


RE: Caption of the webedit changing - shivu.impu - 02-14-2012

you can solve it bygetroproperty and settoproperty


RE: Caption of the webedit changing - supputuri - 05-29-2012

For which object we have to use the getroproperty? Please test the code before you post in the forum and make sure that it's a workable solution.