Add error checking to MercuryTest $.click() and $.input()