Micro Focus QTP (UFT) Forums
Object required error received after object was set - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Object required error received after object was set (/Thread-Object-required-error-received-after-object-was-set)



Object required error received after object was set - RJP - 01-20-2011

My web interface contains a table of objects retrieved at runtime. I need to obtain the innertext property of one of the cells (WebElement) in the table. I have attempted many variations on the following method:
Code:
Set obj_FromDt = obj_Table.ChildItem(2, 2, "WebElement", 0)
    FromDt = obj_FromDt.GetROProperty("innertext")

I am able to successfully set the object, but when the debugger hits the second line I receive an object required error. The variable watch list in the debugger indicates the object was successfully set.

The following method also allows the object to be set, but fails (with the same object required error) on the second step:
Code:
Set objTest = Browser("BrowserName").Page("PageName").WebTable("table_Results").ChildItem(2, 2, "WebElement", 0)
    tst = objTest.GetROProperty("innertext")
Where am I going wrong here? Thanks for any help!