Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fix a SetObject = statement
#1
Not Solved
In a For loop, this code works:

Code:
NumGr = GrC*2+2
Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type_" & NumGr)

However, I must keep each Document Type_# in my OR. This does not work well as the table numbers change. I could I guess have Document View_1 to _100

With an OR object Document View (name is Document View.* and regexp on), I tried these using RegExp:

Code:
Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("name:=Document Type_" & NumGr,  "visible:=True", "html tag:=Table")
Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerText:=" & "Document Type",  "visible:=" & "True", "html tag:=" & "Table") Then ', "index:=" & NumGr)
Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("innerText:=Document Type",  "html tag:=Table", "index:=" & NumGr)

But none of these Set TableObj = worked. What am I doing wrong?

The table index # is always changing. I need to find the table # that is visible. And set my TableObj to this number. Any ideas?

see atttachment for OR properties


Attached Files
.pdf   Fix Set TableObt =.pdf (Size: 68.61 KB / Downloads: 126)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP key issue fix kprasadbio 1 3,053 05-04-2013, 10:47 AM
Last Post: Saket
  how to fix scripts if browser name has changed Jenny 1 2,039 10-23-2010, 04:54 PM
Last Post: SaurabhGupta
  Importent - WebElement is changed to Link Objects - How to fix? farhanalam 0 1,832 03-27-2009, 09:37 PM
Last Post: farhanalam

Forum Jump:


Users browsing this thread: 1 Guest(s)