 Hartman was elected as a Republican to the Sixty-second Congress.He was unsuccessful as a candidate for reelection in 1912, and for election in 1914.He resumed his former mining and banking pursuits at Hollidaysburg.