Senators have to be present on the Senate floor to vote. McCain did not vote. See reply 42.
There have been cases in the past where sick Senators were brought in on a gurney so they could cast their vote. Sorry, I have no names or dates.
Yeah I finally saw a post where he did not vote but the report acted like he had.