The problem is for online tests the professors use a standard test generated by the textbook company. All you have to do is enter the question into a search engine and the question with the right answer will appear. A good option is to use a program that locks out the copy and paste feature and does not allow for other tabs to be open. You could also require a webcam to be present to ensure the test taker is not using another device.
No, we don’t all use the textbook exam questions or textbook assignments. My assignments, for instance, have a narrative and requirements written by me and if I use a textbook problem, I have changed the specs and the requirements to be more complicated with different expected outcomes. I’ve been dealing with Chegg, Coursehero, and others for years. For what it is worth, some of the “experts” who solve the problems for pay get it wrong or horribly foul up the solutions. One more thing that makes it easy for me to catch the lazy cheating and fail them for the course on the spot. Timing out the exams and randomizing the questions from a large pool is a good way to keep them from cheating. They run out of time if they don’t press ahead. No time to look up every answer. I despise cheaters and I warn them at the beginning of each term. I have developed a reputation for being a rat catcher.