Stream of consciousness rationale: The important part for answering this question is: The amendment supersedes Article I, § 3, Clauses 1 and 2 of the Constitution, under which senators were elected by state legislatures.
The question and answer pair are described below.
Q: The Seventeenth Amendment (Amendment XVII) to the United States Constitution established the popular election of United States Senators by the people of the states. The amendment supersedes Article I, § 3, Clauses 1 and 2 of the Constitution, under which senators were elected by state legislatures. It also alters the procedure for filling vacancies in the Senate, allowing for state legislatures to permit their governors to make temporary appointments until a special election can be held.

Answer this question based on the passage: who elected members of the senate before the 17th amendment?
A: state legislatures