Probably not because judges are aware of the fact that testifying in court can be a very scary experience for a child. It is recognized that children forced to testify against a parent is not the ideal situation especially during a bitter custody dispute.
If the judge needs the testimony or evidence of the child's views/preferences in order to make a determination, then the following options are available. Such as the appointment of the Office of the Children’s Lawyer.