Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to identify the object when it is dynamically changing behavior
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
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


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 3 Months, 2 Weeks ago
Venkat -
Have you tried taking the childobjects of the webtable and then finding out the innertext and when it matches "Status", find the micclass ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 11 Years, 3 Months, 2 Weeks ago
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
Reply
#4
Solved: 11 Years, 3 Months, 2 Weeks ago
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 ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Solved: 11 Years, 3 Months, 2 Weeks ago
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.
Reply
#6
Solved: 11 Years, 3 Months, 2 Weeks ago
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.

Reply
#7
Solved: 11 Years, 3 Months, 2 Weeks ago
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..
Reply
#8
Solved: 11 Years, 3 Months, 2 Weeks ago
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()
Reply
#9
Solved: 11 Years, 3 Months, 2 Weeks ago
Great Job Venkat !!! You are valuable to this forum.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#10
Solved: 11 Years, 3 Months, 2 Weeks ago
Thanks for your appreciation basanth
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing Data in the application newbieny 0 760 07-17-2019, 07:11 PM
Last Post: newbieny
  Unable to identify Child Object for a window application created using C#. ssanjeev 3 6,207 03-27-2017, 05:38 AM
Last Post: ankita
  How to identify Jquery slider object and use the slider in QTP? axn700 0 2,676 10-22-2015, 12:03 PM
Last Post: axn700
  When UFT Does Not Identify an Object vinod123 4 7,379 06-20-2014, 02:44 PM
Last Post: vinod123
  "Cannot identify object" failure only when script is checked into QC msacks 0 2,019 02-28-2014, 12:40 AM
Last Post: msacks

Forum Jump:


Users browsing this thread: 2 Guest(s)