I am trying to automate component identification using Jython script. The problem is I am unable to stop the iteration once the matching value is reached. The code is:
def GetAll(Dialog):
ChildItems=Dialog.getComponents()
for item in ChildItems:
GetAll(item)
rc.logMessage(str(item.getName()))
if(str(item.getClass())==rc.lookup("Class")):
if (str(item.getName())==rc.lookup("TextOnButton")):
item.doClick()
rc.setLocal("Clicked", True)
break
I am unable to break the for loop despite putting the break statement.
This should work. Need to check make a parameter for what type of property you are looking for. This may work only for the items that may have property as above.