Since you purchased your unit used it may have not worked on electric at that time. The most common fault is a burned out heat rod. If the power is on with no water in the heater it is only moments before the element is burnt out. You could remove the element and see if this was the case. You should be able to check it with a VOM at the contacts to see if power is getting there when switched on.
Harry and Rowena Johnson 2002 Southwind 35R 2000 Accord n 2012 CRV toads