The return judges of the said city and county, and of each county in the state, shall, when they meet as now required by law, faithfully add up the votes given at said election for district attorney, and he who has the highest number of votes shall be declared duly elected; and they shall make out duplicate certificates, one of which shall be delivered to the person thus declared elected, and the other to the prothonotary of the court of common pleas of the proper county; and on the first Monday of November after said election, the person who is legally elected shall appear in the court of common pleas of said county, if in session, and if not, then at the next session of said court, and then, in open court, take and subscribe the same oath or affirmation as is required to be taken by the attorney general; which oath shall be entered upon the records of said court.
16 P.S. § 9951