WaitForFeatureLoadInEditor.sikuli

(Download this script)
n = 6
for x in range(n):
    if exists(,1):
        exit(0)
    if exists(,1):
        exit(0)

exit(1)