xxxxxxxxxx
//For playing the animation
//For playing animation we can use Play() but for stopping the animation the Stop method is become obsolete in Unity 2019 or higher versions. So, For disable animation we can use enable flag and set it to false.
frog.GetComponent<Animator>().Play();
or
frog.GetComponent<Animator>().enable = true;
//For stop the animation
frog.GetComponent<Animator>().enabled = false;