Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding the correct Link
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Attached is a set of 4 screenshots each of an Object Spy of a Display link. The only difference I can see to deffer between each link izs the absY and href properties.

How can I use the below to find each Display link?

Code:
Browser("Wisdom").Page("Wisdom").Frame("parent").Link("Display").Click


thx for looking


Attached Files
.pdf   4 Display link Object Spy screenshots.pdf (Size: 84.16 KB / Downloads: 151)
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

Try using the WebTable DocumentType and identify them based on their row,column numbers and use the ChildItem property to set the object and click on them.

Or if you are very much sure that the href property values are not going to change use the identification property href and regularize the expression as
^.*ANNUAL\nSUMMARIES\nAND\nYEARLY\nTAX\nFORMS.*
^.*ASSET\nTRANSFER\/401\nNOTIFICATIONS.* so on...

If you find any other alternative let me know too Smile

Thanks

Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
This might be a crazy way to find my link, but i got it to work. What I can find is the group namer table html id, and i knows the name of the report name link that i need, so i find the table and then search the links until i find the matching report name link and thus get the ab s_x and _y cordinates to thus click on the link. goofy?

Here is my code:

Code:
'Set Table to current open GroupName
If Browser("Wisdom").Page("Wisdom IA").Frame("Title:=Please Select An Application").WebTable( "html id:=NestedGrid1").Exist(1) Then
Set TableObj = Browser("Wisdom").Page("Wisdom IA").Frame("Title:=Please Select An Application").WebTable("html id:=NestedGrid1")
Else
Reporter.ReportEvent micFail, "Document View table Missing", "The table for Document Type 1 " & " in: " & ReportsLink & " - was NOT found."
ExitTestIteration
End If

BeginTableCount = 1 'Rows number 1 of table being retrived
EndTableCount = 0 'End row count of table being retrived
NewRowCount = TableObj.RowCount 'Start, Row count of reports for each GroupName
EndTableCount = NewRowCount - 1 'End, Row count of reports for each GroupName

'Find Link name
For r = BeginTableCount to EndTableCount
ColCount = TableObj.ColumnCount®
For c = 1 to ColCount
ChildCount = TableObj.ChildItemCount(r, c, "Link")
If ChildCount > 0 Then
For k = 0 to ChildCount - 1
rNumber = rNumber +1
Set LinkObj = TableObj.ChildItem(r, c, "Link", k)
LinkName = LinkObj.GetROProperty("innerText")
If ReportName = LinkName Then
absX = LinkObj.GetROProperty("abs_x")
absY = LinkObj.GetROProperty("abs_y")
End If
Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation UFT is not finding object in runtime but able to locate the object from repository amar.vallapreddy 1 2,729 02-25-2014, 02:22 PM
Last Post: guin.anirban
  The recorded text output not appear on the correct row on the results datatable trance07 0 2,287 09-25-2013, 08:05 PM
Last Post: trance07
  Correct syntax for read and load global datatable from Resources tab in QC to QTP hari1024 1 5,283 12-08-2011, 10:43 AM
Last Post: sshukla12
  Finding the correct WebTable mv8167 0 2,423 12-07-2011, 02:38 AM
Last Post: mv8167
  Finding Links with Paren's mv8167 10 7,560 09-27-2011, 02:46 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)