1
votes

I have win 7 machine + UFT 11.53 + IE8

I am unable to access

Browser("browser").Object

It throws "General error". However I am able to access

Browser("browser").Page("Page").Object

Anyone faced similar issue? It used to work fine before. Not sure what the exact issue is!!

4

4 Answers

1
votes

It's invalid line of script what it's the need to use this command ?

you can use :

Browser("browser").Page("Page").Object.click()
X = Browser("browser").Page("Page").Object.getRoProperity()
Y = Browser("browser").Page("Page").Object.getToProperity()
...... etc. 

also if the UFT not recoginized the objects close the browser and UFT

then open IE8 try to check "UFT-BHO manager if it enabled or not" then open UFT and try again.

0
votes

Could be something to do with the Object Repository. It might be worth trying to perform this via DP instead of via the OR.

Try something like:

Set Obj = Browser("micClass:=Browser").Object

I've not worked with QTP/UFT in over a year now so can't check if this works but worth a go.

0
votes

What is the need to save the browser in object script ?

i think if you try to fine something in the browser without OR you need to use descriptive programming :

Dim oDesc        'Description Object
Dim colObject    'Object Collection

Set oDesc = Description.Create
oDesc( "micclass" ).value = "Link"
oDesc( "x" ).value = 51  '51, not "51".

Set colObject = Browser( "title:=Google").Page("title:=Google").ChildObjects( oDesc )

'Will return 1
MsgBox colObject.Count

'Will return Images
For x = 0 to colObject.Count - 1
    MsgBox colObject(x).GetROProperty("innertext")
Next

--- Or add it directly to Object repository with unique value like HTML_ID or URL or href or class .........

0
votes

It is not a logic issue as i said in my comments. Somehow there were 2 BHOManager.dll in the machine which was causing this issue. Removing them and repairing QTP made it work fine.