It happened, when Joshua was by Jericho, that he lifted up his eyes and looked, and, behold, there stood a man over against him with his sword drawn in his hand: and Joshua went to him, and said to him, Are you for us, or for our adversaries?
Thus, despite the fact of our ignorance of just HOW or WHEN God revealed all of the instructions which Joshua evidently followed, he did indeed have Divine guidance in the conquest of Canaan.