02-17-2011, 06:47 AM
Hi All,
I have corrected the typo error "Links" in my code and now the code looks as below (this is taken from some other thread in this forum)
When I ran this, it is failing when invoking some method on "Browser" object like "Browser(oBrowserDescriptions).Exist()" or "Browser(oBrowserDescriptions).Navigate("http://www.yahoo.com" )", as if some kind of NullPointerException in java or some other language. The exact error message I see here is
Cannot identify the object "[ Browser ]" (of class Browser). Verify that this object's properties match an object currently displayed in your application.
Line (8):
From the error, it appears as if Browser object was not created. Do I need to create the Browser object explicitly or for that matter, how does this work in Descriptive Program. Many examples which I saw in other posts and forums, the skeleton remains the same as above, but some how it is failing or apparently I'm missing something here.
I have corrected the typo error "Links" in my code and now the code looks as below (this is taken from some other thread in this forum)
Code:
Set oBrowserDescriptions = Description.Create ()
oBrowserDescriptions("micClass").Value = "Browser"
oBrowserDescriptions("openedbytestingtool").Value = "True"
Browser(oBrowserDescriptions).Exist()
Set oPageDescriptions = Description.Create ()
oPageDescriptions("micClass").Value = "Page"
Set oBrowserObj = Browser(oBrowserDescriptions).Page(oPageDescriptions)
Systemutil.Run "iexplore"
Browser(oBrowserDescriptions).Navigate("http://www.yahoo.com" )
oBrowserObj.Sync
'Set oBowserChObj = oBrowserObj.ChildObjects(oLinkDescriptions)
Set oBowserChObj = oBrowserObj.ChildObjects()
iChObjCnt = oBowserChObj.Count -1
msgbox iChObjCnt
For iCount = 0 to iChObjCnt
If oBowserChObj(iCount).GetROProperty("micclass") = "Link" Then
If oBowserChObj(iCount).GetROProperty("visible") = true Then
msgbox oBowserChObj(iCount).GetROProperty("name")
End if
End If
Next
When I ran this, it is failing when invoking some method on "Browser" object like "Browser(oBrowserDescriptions).Exist()" or "Browser(oBrowserDescriptions).Navigate("http://www.yahoo.com" )", as if some kind of NullPointerException in java or some other language. The exact error message I see here is
Cannot identify the object "[ Browser ]" (of class Browser). Verify that this object's properties match an object currently displayed in your application.
Line (8):
Code:
"Browser(oBrowserDescriptions).ClearCache".
From the error, it appears as if Browser object was not created. Do I need to create the Browser object explicitly or for that matter, how does this work in Descriptive Program. Many examples which I saw in other posts and forums, the skeleton remains the same as above, but some how it is failing or apparently I'm missing something here.