In the trial of the case of a contested election, the parties shall be restricted to the grounds of objection in the specifications set forth and shall not examine into the illegality of any votes other than those specified as illegal nor impeach such votes for any causes other than those specified.