An elementary derivation of Wilson's and Polyakov's confinement tests from the Hamiltonian formulation