Both candidates won nearly all the votes of members of their respective parties , but McDonnell took a decisive 62 percent majority of the independent vote -- a group that was divided between Barack Obama and John McCain in 2008 .