Lawmakers believe Tuesday’s elections will encourage senators in both parties to find a way to reopen the government.