Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to access webtables without adding into Object Repository
#3
Not Solved
Here is my code:

In the below code webtable("GBS") has to be replaced with new value of str for each for loop.

Issue is : How to add these webtables to object repository. Because i am getting the error as "Object GBS does not exist in object repository..."

Code:
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebTable"
Set EditCollection = Browser("Inoplan2").Page("Inoplan2").Frame("Corpo").ChildObjects(oDesc)
NumberOfEdits = EditCollection.Count
For i = 6 to NumberOfEdits-1
    WebTableTitle = EditCollection(i).GetROProperty("column names")
    str=Mid(WebTableTitle ,2,(instr(2,WebTableTitle ,";")-2))
          'Browser("Inoplan2").Page("Inoplan2").Frame("Corpo").WebTable("GBS") 'Original table name
    Set myobj=Browser("Inoplan2").Page("Inoplan2").Frame("Corpo").WebTable(str)
    myobj.SetTOProperty "name" , EditCollection(i).GetROProperty("name")
    myobj.SetTOProperty "html id" , EditCollection(i).GetROProperty("html id")
    myobj.SetTOProperty "outertext",EditCollection(i).GetROProperty("outertext")
    myobj.RefreshObject
    msgbox myobj.RowCount
    Set myobj = Nothing
Next
Reply


Messages In This Thread
RE: How to access webtables without adding into Object Repository - by ramkumarad - 01-05-2012, 06:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question adding two conditions into a while statement lotos 4 4,855 11-10-2017, 04:49 AM
Last Post: lotos
  Uft: Adding a property to all ojects into Repository ProTester 0 1,267 06-09-2017, 12:48 AM
Last Post: ProTester
  adding an object to OR seven 1 2,586 02-17-2014, 02:23 PM
Last Post: basanth27
  which gives better performance qtp with Object repository or qtp without OR. qtpexpert 6 6,149 10-29-2013, 08:56 PM
Last Post: Parke
  Adding Visual Relation id via script to new object jcraig26 1 3,984 06-24-2013, 01:26 PM
Last Post: ourhari

Forum Jump:


Users browsing this thread: 1 Guest(s)