As senators voted on amendments to the trafficking bill, about two dozen black men showed up at the office of Mr. Cornyn, who is the Republican whip, demanding to speak to him about the delay in the confirmation vote on Ms. Lynch. Now the United States attorney for the Eastern District of New York, Ms. Lynch would become the first black woman to serve as attorney general. With the stated support of at least five Republican senators, she is expected to be confirmed, ending her more than five-month wait since being nominated — the longest of any cabinet secretary in the past three administrations.

“More Americans are doing more stuff, but somehow this Senate can’t actually do two things at one time? That makes no sense,” said Roland Martin, a commentator and host on TV One, and an organizer of the demonstration. “It’s not just about if you’re heard. It’s, ‘Dammit, get to work.’ ”

The Obama administration took one last dig at Senate Republicans Wednesday, with Eric Schultz, the deputy White House press secretary, telling reporters that Ms. Lynch had been “waiting longer than it took to write the Constitution to be confirmed by the United States Senate.”

On Wednesday, senators waded into a sea of amendments to the trafficking bill. Among those approved was one that would require the secretary of defense to identify to the attorney general those prosecuted under the military justice system who are required to register as sex offenders, while another would increase grants to states that have laws terminating the parental rights of those who father children through rape.

An amendment introduced by Senator Patrick J. Leahy, Democrat of Vermont, that would have increased protections for homeless children, said to be the most vulnerable to traffickers, ultimately fell short of the 60 votes it needed to pass.

The Senate started its day Wednesday by unanimously approving the changes to the bill, worked out primarily by Mr. Cornyn and Senator Patty Murray, Democrat of Washington.

The deal would address Democrats’ concerns that the legislation would expand the Hyde Amendment, a law that prevents taxpayer dollars from being used to pay for abortions, by essentially splitting in two a victims’ fund created in the bill. Fines collected from trafficking offenders would go toward non-health care services, while federal money for community health centers — subject to the Hyde Amendment — would provide the rest. Many victims would be able to obtain abortions under the laws’ exemption in cases of rape.

“I know that Senator Cornyn and many others agreed with us that an effort to fight back against human trafficking in our country is, without question, no place for gridlock and dysfunction,” Ms. Murray said on the floor. “It certainly shouldn’t have taken this long.”