British Prime Minister Boris Johnson said on Friday his government will obey the law and remains confident the country can leave the European Union with a deal.