08-13-2008, 10:16 AM
Hi, can any one tell me why the following programme shows general run error. I do not have any programming back ground or scripting knowledge. I am fond of programming..so learning descriptive programming on my own
help me pl....
Code:
'Retrieve Child Object Properties
Class Childobject_Properties
Function child_object_on_browser(objn,objp,excelname)
Set xl=createobject("excel.application")
xl.workbooks.open(excelname)
xl.worksheets(2).name=objn
xl.activeworkbook.save
'xl.visible.true
Set objc=description.Create
objc("micclass:").value=objn
Set objc1=browser("name:=User Login page").Page("name:=User Login page").ChildObjects(objc)
no.c=objc1.count
For i=0 to no.c-1
co.p=objc1(i).getROProperty(objp)
k=i+1
Do
x=xl.sheets(objn).cells(k,1)
If x=empty Then
Exit do
else k=k+1
End If
Loop
xl.sheets(objn).cells(k,1)= objp
Next
xl.activeworkbook.save
xl.quit
Set xl=nothing
Set objc=nothing
Set objc1=nothing
End Function
End class
objn1="web edit"
objp1="name"
excelname1="E:\Automation Framework\Test Data\Child Object Properties.xls"
Set obj_Childobject_Properties=new Childobject_Properties
var=obj_Childobject_Properties.child_object_on_browser(objn1,objp1,excelname1)
Set objc=nothing
Set objc1=nothing