This is a function library i have written for retrieving the data from an excel sheet.
But whenever i tried to execute the same code i get General Run Error.
can anybody suggest me the right answer.
General Run Error
Function file:
C:\Program Files\HP\QuickTest Professional\Tests\FindObject.vbs
Line (29): " FindObject=obj(0)"
this is the Error i get whenever i execute the Above code
But whenever i tried to execute the same code i get General Run Error.
can anybody suggest me the right answer.
Code:
Function FindObject(ObjectName)
Set desc=description.Create
For j=1 to datatable.GetSheet("OR1").GetRowCount
datatable.GetSheet("OR1").SetCurrentRow(j)
If datatable("name","OR1")=ObjectName Then
If datatable("micclass","OR1")<>" " Then
desc("micclass").value=datatable("micclass","OR1")
End If
' If datatable("html id","OR1")<>" " Then
' desc("micclass").value=datatable("html id","OR1")
' End If
If datatable("class","OR1")<>" " Then
desc("micclass").value=datatable("class","OR1")
End If
If datatable("innertext","OR1")<>" " Then
desc("micclass").value=datatable("innertext","OR1")
End If
Set obj=Browser("creationtime:=0").page("title:=.*").ChildObjects(desc)
FindObject=obj(0)
'obj1=FindObject(obj)
End If
Next
End Function
General Run Error
Function file:
C:\Program Files\HP\QuickTest Professional\Tests\FindObject.vbs
Line (29): " FindObject=obj(0)"
this is the Error i get whenever i execute the Above code