Not able to find object
In my script using findall method but it is not working as expected sharing piece of code below:
var lockConnectedFlag = 0
Aliases.javaw.stageLockConfigurationTool.scene.topLevelTabPane.labelDiagnostics.Click()
var j = 0
var v = null;
Delay(5000)
var LockList = Aliases.javaw.stageLockConfigurationTool.scene.topLevelTabPane.rightLockListView
var LockCount = GetPropertyValue(LockList, "wRowCount")
for (i = 0; i < LockCount; i++) {
var prop = new Array("JavaFullClassName", "JavaFXObjectIndex")
var value = new Array("javafx.scene.control.TableRow", i)
v = LockList.FindChild(prop, value, 100)
var prop1 = new Array("JavaFullClassName", "columnIndex")
var value1 = new Array("com.assaabloy.lct.ui.util.LctGuiUtil$2$1", 1)
var SNum = v.FindChild(prop1, value1, 100)
Delay(5000)
var SerialNum = aqObject.GetPropertyValue(SNum, "JavaFXObjectText")
do {
var SerialNum = aqObject.GetPropertyValue(SNum, "JavaFXObjectText")
}
while (SerialNum == "") {
Log.Message("Trying to get the Lock serial no")
}
Log.Message(SerialNum)
if (LockSerialNumber == SerialNum) {
Delay(2000)
var prop2 = new Array("JavaFullClassName", "columnIndex")
var value2 = new Array("com.assaabloy.lct.ui.custom.DiagnosticsTableActionCell$1",
var Action = v.FindChild(prop2, value2, 100)
var prop4 = new Array("JavaFullClassName", "columnIndex")
var value4 = new Array("com.assaabloy.lct.ui.custom.DiagnosticsTableActionCell$1",
var prop3 = new Array("JavaClassName", "JavaFXObjectName", "JavaFXObjectIndex")
var value3 = new Array("HoverAwareImageView", "diagnoseButton", 0)
var Advancebutton = Action.FindChild(prop3, value3, 100)
if (Advancebutton.WaitProperty("Exists", "true", 10000) == true) {
Advancebutton.Click()
} else {
Log.Message("Diagnose button is not enabled")
}
so in above piece of code Advancebutton always comes as false but i have checked its prop and values are matching when i checked with object spy tool.
still code seems correct but adavacnebutton click never happens.
for the same Desktop app in previous versions only the JavaFXObjectName name is changed but still in previous versions it works but not in latest version of desktop app.
may be this is testcomplete issue as you can also see a while condition where i am not getting property value unless i run infinite loop.
so is this an issue with Testcomplete ?