Each state has different sources in regards to the preparation for the tests.
In my area, it's class room time.
As of yet, I have not heard of anything, anywhere that can be taken online (which actually, makes sense to me).
BTW: If my memory serves me right, (in my area) you need to have proof of 3 years of fulltime work in some area of the construction/building field, in order to take the test (that is just one of the requirements to take the test). Have you done all the reseach to see what the requirements are for your area - in order to take the test?
Do some more research online. If you are serious and have some experience (beyond just wanting to get a contractor's license).....read up and see if you can find any info. here > (The forum is entitled "Contractor Licensing
" and contains alot of information regarding questions like yours: