Friday 's bloodshed came hours after Palestinians finished voting in local elections in the West Bank widely seen as a test of the political clout for the militant group Hamas ahead of a parliamentary ballot in January .