Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding the correct WebTable
#1
Not Solved
Finding the correct WebTable:

I am stuck on how to find the currently open table in the following screen:
(see attachment)

As you open each of the Document Type links (ie CLIENT DOCUMENTS - PCG) a new set of report links open. Each Document Type could repeat names and even though the other Report Links disappear, QTP can find them.

I need to be able to find and set the table to the currently visible table.

I was using the code (table name incremented by 2)

Code:
For GrC = 1 to N

NumGr = GrC+2

If Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type_" & NumGr).Exist(1) Then
    Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type_" & NumGr)
Next

But this failed to find the correct table on following iterations.

I then tried:
Code:
For GrC = 1 to N

NumGr = GrC+2
        If     Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebElement("innerhtml:=" & GroupName & *, "Visible:=True").Exist(1) Then
             Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebElement("innerhtml:=" & GroupName, "Visible:=True")

        ElseIf     Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerhtml:= Document Type", "Visible:=True").Exist(1) Then
             Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerhtml:=" & "Document Type", "Visible:=True")

        ElseIf     Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerhtml:=Document Type", "Visible:=True").Exist(1) Then
             Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerhtml:=Document Type", "Visible:=True")

        ElseIf     Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type_" & NumGr).Exist(1) Then
             Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerhtml:=Document Type", "Visible:=True") '_" & NumGr)

Next

But none of these work either.

Do you have a solution?


OSpy below
(see attachment)


Attached Files
.pdf   Finding the correct WebTable.pdf (Size: 120.24 KB / Downloads: 98)
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,720 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,278 09-25-2013, 08:05 PM
Last Post: trance07
  Finding the correct Link mv8167 2 4,405 01-24-2012, 07:58 PM
Last Post: mv8167
  Correct syntax for read and load global datatable from Resources tab in QC to QTP hari1024 1 5,266 12-08-2011, 10:43 AM
Last Post: sshukla12
  Finding Links with Paren's mv8167 10 7,438 09-27-2011, 02:46 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)