If you are uncomfortable, talk to the teacher. That gives the teacher a heads up about how to prepare the exams fairly and also the teacher can inform other students of this resource. I think you will feel better even if what you are doing is not objectively wrong.
Online exam questions should be a good way to test your general knowledge and absorption of material but should not be a way to prepare for specific test/exam questions, I would think. And that is more under the control of the teacher than you, when you think about it. So just let the teacher know.