Israel's military has launched an operation in the occupied West Bank after gunmen killed two IDF soldiers days ahead of the country's elections.