As a last resort, and extremely rarely, a medieval trial might be decided by Combat or by Ordeal. In the case of combat, the parties could each appoint a Champion to fight for them. The idea was that, in the combat, God would favour the right.
Similarly with the ordeal. A common ordeal was to pick an object, with a bare hand, out of boiling water. Again, the theological basis of the ordeal was that God would give courage to the party in the right - maybe even a miracle. Psychologically, of course, it could work too - as the party in the wrong would be less likely to brave the pain.
The reason, however, why such trials are rare is that they were only needed in cases which a Judge could not decide; and in cases so marginal, the difference between right and wrong, even in the minds of the parties, is by definition unclear.