By revelation then?
Yes, the lots, (A method the current twelve used) was a divine revelation to them. Certainly not the way a Pope is chosen now.
While the eleven casted lots Jesus acted on His own and hand picked Saul/Paul. This added even more questions about the “line”.