If the object is not being highlighted, then it means it's not able to find the advance button with the property values you have provided
You are also not checking the returned object exists for v, SNum and Action,
var v = LockList.FindChild(prop, value, 100)
var SNum = v.FindChild(prop1, value1, 100)
var Action = v.FindChild(prop2, value2, 100)
I'm curious to know, what this code is supposed to do?
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)
I suggest you debug you code, and step through each line to see what is actually going on.