Don't give them partial information to win them other. Address your oppositions' points and respond to them. If they're points your opponents can drive a truck through, the legislator will be ineffective on your behalf. This also puts you on poor footing with your legislator because you've let them be made a fool of. Cynics insist that every major legislative decision is made behind closed doors.
Testimony is good, and can sway votes.
Library advocates shouldn't feel shy about getting in front of the microphone at legislative hearings. Don't ask them to withdraw their own proposed legislation. No legislator does that, and it makes you look silly to even ask. Don't threaten to keep them from being re-elected. No one person or group holds this power, and it makes you sound shrill and intemperate.