No. And saying this totally misunderstands American politics.
First off, it's not like being black is some kind of sure fire winner for candidates. It has historically been pretty rare for black politicians to be elected to office from majority white constituencies. Even now, in what some people consider a "post racial" era, most black elected officials still represent predominantly non-white areas. (one of the reasons there have been so few black Senators is because there are no majority black states).
Second, Hilary Clinton, who is white, ran neck and neck with Obama until very late in the Democratic primary. And support for her and Obama did not break along racial lines within the Democratic party. Clinton had many black supporters and was actually leading Barack Obama among black Democrats at times in the primary.
Third, being black may have actually cost Obama some votes. If you look at the election returns for 2008, there were a number of counties, mostly clustered in the Deep South, where Obama actually did worse than John Kerry did in 2004. This is unusual since Kerry ran a pretty poor campaign while even Obama's foes acknowledge that he ran an excellent campaign. Across the country Obama increased vote totals for Democrats in most counties, even in states which he lost overall. But in a band in the whitest part of the South he lost votes compared to Kerry.
Fourth, it's not like running black Republicans against Democrats does well. There's some black Republicans elected, most notably Tim Scott in the Senate. But Scott won because he was a die hard conservative candidate in a conservative state. Attempts by Republicans to pander to race against strong Democratic candidates always fail, as Alan Keyes failed when he ran against Obama for the Senate. That's because Democratic voters tend to vote more on policy than on race. Just having a black face up there isn't enough, you need to have the right policies.
Finally, the big factor in electing Obama was not the color of his skin, but the fact that he had a D after his name. Whoever won the Democratic nomination in 2008 was almost certain to win the general election. The Republican party had made such a shambles of the country that the American people were desperate to throw the bums out. In 2006, they had given a big victory to the Democrats in Congress and in 2008 they were desperate to hand them more power by giving them the White House.
I think your argument here fundamentally misunderstands how American politics works in general and how the 2008 election in particular worked. My guess is that this is because you are conservative in your politics. Conservatives have always had a real problem with Obama and have tried to portray his election in 2008 as illegitimate. That's the reasoning behind the "birther" movement. But it's also the reaosning you use here. For conservatives, Obama couldn't have gotten elected in 2008 because a majority of Americans actually agreed with Democratic policies and thought he'd be a good leader. He can't have gotten elected because Republicans, when they ran Washington, screwed things up so royally that Americans were desperate for someone else to take over. Because those reasons, the real reasons he was elected, reflect bad on Republicans, or at least point out that the American people disagree with some Republican ideas, at least some of the time. Instead, Republicans like to act as if 2008 was the result off some kind of national dementia. That Obama is such a silver tongued speaker that he conned everyone into voting for him. Or, in this case, that the American people were just so eager to prove how enlighened they were that they totally ignored policy or leadership qualities and just elected whatever black guy got shoved in front of them.