I am trying to capture text from a web page, I am using
CheckErrorMessage= Browser("Registration").Page("errorpage").WebEleme nt("html id:=errDiv","html tag:=DIV").GetROProperty("innertext")

This statement returns text if the previous steps are recorded but it does not return text when I am using a shared Object repository and a manually written script.

I have tried using the exist property and it returns true.

Can anybody please suggest why the text is not returned.