The prince of Yahweh's host said to Joshua, Put off your shoe from off your foot; for the place whereon you stand is holy. Joshua did so.
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.