Micro Focus QTP (UFT) Forums
How to identify the object when it is dynamically changing behavior - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: How to identify the object when it is dynamically changing behavior (/Thread-How-to-identify-the-object-when-it-is-dynamically-changing-behavior)

Pages: 1 2


How to identify the object when it is dynamically changing behavior - venkatbatchu - 10-26-2009

Hi All,

I have a one field “Status” on web page and also have one setting
“Allow_Help: Yes “means then field appear as a link and will display the help by click on the field


If I use the “Allow_Help: No “field name appears like static text and any help is not provided for this

See the attached document so that u will get more idea

My query: I want to find whether the field is appearing as static text or link

Please suggest me with a solution
Posting the attached document too


Thanks in advance,
Venkat


RE: How to identify the object when it is dynamically changing behavior - basanth27 - 10-26-2009

Venkat -
Have you tried taking the childobjects of the webtable and then finding out the innertext and when it matches "Status", find the micclass ?


RE: How to identify the object when it is dynamically changing behavior - venkatbatchu - 10-26-2009

Thanks Basanth,
In a web page let say outof 100 rows and 10 coulumns i may be having 10 fields appears as links and not know which fields appears as link

as per ur suggestion :
webtable("xxxx").getrocellwithtext("status") (here i will be not knowing which field appears as link..
then i will be going to find the micclass

Can u please help me in this regard


RE: How to identify the object when it is dynamically changing behavior - basanth27 - 10-26-2009

I asked you to explore as childobjects. When you get the collection of the childobjects inside the webtable, Find out which is a status one by using the innertext. Next, find the micclass of the matched innertext.

How many objects with the name "Status" can be found ?


RE: How to identify the object when it is dynamically changing behavior - latika - 10-26-2009

Hi Everyone,
I am Latika, new to this Forum. Experienced only in Manual Testing but zeal to learn and work on QTP. I wish everybody wud help me out in this regard. As a beginner I hv many questions.


RE: How to identify the object when it is dynamically changing behavior - Saket - 10-27-2009

Hi Latika,
Good to know that you are excited to learn QTP. we(All the members) will definitely try our best to help you in resolving all your queries.
There are certain guidelines which you will have to have to follow while posting a reply in a thread or creating a new thread for your query.
Please refer posting guidelines.

always reply in a post, if you have any answer for the original query or you have a query relevant to the original thread query.


RE: How to identify the object when it is dynamically changing behavior - venkatbatchu - 10-27-2009

Thanks basanth,
i would like to explain the same scenario with different example

I have 5 rows and 5 coulmns
25 fields area available in web table
among 25 fields 7 are appears as links and remaining 18 fields appears as labels(static text)

Here my requirement is i need to fetch the 7 fields which appears as links

With the child objects for the web table i could able to find how many links are avaialble under web table i.e 7

Can you please let me know the remaining solutions

Basanth very very thanks for yout prompt replies.....
Thanks alot

Finally how to fetch the micclass from web table objects ?
we know that we r using webtable then why need to get the micclass so obviously micclass=webtable

Please let me know if i am thinking in wrong direction..


RE: How to identify the object when it is dynamically changing behavior - venkatbatchu - 10-28-2009

Hi All,
Thanks for all your respoonse,
I have find the solution and implemented in my code,
Thanks basanth for your valuable suggestion....

Forgot to paste the code here,

Code:
Sub ChildObjects_Example()
Set oDesc = Description.Create()
    oDesc("html tag").Value = "A"
Set EditCollection = Browser("xxxx").Page("xxxxx").Frame("xxxx").WebTable("Category").ChildObjects(oDesc)
NumberOfEdits = EditCollection.Count
msgbox NumberOfEdits
'Search for a specific link object and fetch its value
For i = 0 To NumberOfEdits -1
    If EditCollection(i).GetROProperty("html tag") = "A" Then
       p= EditCollection(i).GetRoProperty("name")
       msgbox p
    End If
Next
End Sub
Call ChildObjects_Example()



RE: How to identify the object when it is dynamically changing behavior - basanth27 - 10-28-2009

Great Job Venkat !!! You are valuable to this forum.


RE: How to identify the object when it is dynamically changing behavior - venkatbatchu - 10-28-2009

Thanks for your appreciation basanth