Moses did not go to Egypt with a lot of self-confidence, and it appears that he did not move at all unless the Lord commanded him to do so. At each step along the way, God told Moses what to do, and He also told Moses what to expect.
From the start, God told Moses that Pharaoh would not be willing to let the people of Israel go. God repeatedly said that Pharaoh would not let the people go.