NXP-12456: adapt wait and find according to new API