AP: Democrat Sen. Barack Obama and Republican Sen. John McCain battled for the White House in an election that challenged attitudes about race as surely as it gauged sentiments about the battered economy and the war in Iraq.