|
|
|
|
Trying to find a specific link
|
|
01-24-2012, 12:32 AM
Post: #1
|
|||
|
|||
|
Trying to find a specific link
I have an issue, using the code: With Browser("Wisdom").Page("Wisdom IA").Frame("parent") absY = .Link("name:="&ReportName, "visible:=True").GetROProperty("abs_x") absY = .Link("name:="&ReportName, "visible:=True").GetROProperty("abs_y") .Link("name:="&ReportName, "abs_x:="&absX, "abs_y:="&absY ).Click End With Found even the hidden links on my page, so the code errored due to many matching links. So, I tried the code: Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("html id:=NestedGrid1") Set LinkObj = TableObj.ChildItem("Link") LinkName = LinkObj.GetROProperty("innerText:="&ReportName) absX = LinkObj.GetROProperty("abs_x") absY = LinkObj.GetROProperty("abs_y") but i am getting a object type m,issmatch error. Any thoughts on what I might be doing wrong? thx for looking. thx for your time Lorena |
|||
|
01-24-2012, 03:09 AM
Post: #2
|
|||
|
|||
|
RE: Trying to find a specific link
This might be a crazy way to find my link, but i got it to work. Here is my 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 End If Next Next thx for your time Lorena |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Find specific file exist in a folder | shijukonline | 1 | 1,152 |
06-07-2011 03:32 PM Last Post: surya_7mar |
|
User(s) browsing this thread: 1 Guest(s)
|
|

Search
Member List
Calendar
Help



