Use waits instead of waitsForAnimationFrame

waitsForAnimationFrame was removed from core due to flakiness.
Use activationCommands instead of activationEvents