No. You should have all requirements of the degree completed. It is not necessary to have the physical diploma in one’s possession. After completion of all requirements of the degree you may obtain a letter of completion from the school and apply for H1B if the quota is still open. One should not apply for the masters’ cap if the degree requirements will not be completely fulfilled by time the H1B application is submitted.