01-05-2012, 06:35 PM
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..."
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