Micro Focus QTP (UFT) Forums
Java objects not refreshed - 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: Java objects not refreshed (/Thread-Java-objects-not-refreshed)



Java objects not refreshed - bonnaudc - 02-28-2017

Hello all

The JavaTree and JavaTable (and other java objects) are not recognized when stored in the repository : first execution is fine but if the object content changes (inside JavaTable for example) the object is not refreshed and throws an error when used later in the script (object not recognized).
The only workaround I've found is to use only dynamic objects.

This problems happens since we moved to UFT 12.52.

Thanks for your help


RE: Java objects not refreshed - vinod123 - 03-03-2017

Expected_Value="test"
RC=JavaWindow(..).JavaTable("Inter-cell spacing:").GetROProperty("Rows")
For i=1 to RC
Value=JavaWindow(..).JavaTable("Inter-cell spacing:").GetCellData(i, 1)
If (Expected_Value=Actual_Value) Then
JavaWindow(..).JavaTable("Inter-cell spacing:").SelectCell i, 1
Exit for
End if
Next


This is an example need exat requirements


RE: Java objects not refreshed - prajyot - 03-08-2017

required_Value="test"
row=window(..).table("Inter-cell spacing:").GetROProperty("Rows")
For i=1 to row
Value=window(..).table("Inter-cell spacing:").GetCellData(i, 1)
If (required_Value=Actual_Value) Then
window(..).table("Inter-cell spacing:").SelectCell i, 1
Exit for
End if
Next