What methods can be used in online exams to genuinely test the students' knowledge and capabilities?
First, a two hour time limit might be difficult to enforce or to guarantee, especially if it uses a real-time clock. At some level of scale you may start to find that some students didn't get the exam paper or were unable to return it by the deadline. So, I'd start by rethinking if a time limit of less than a day is really essential to your exam.
Second, you can pre-vet any questions you ask by doing searching yourself online for possible answers and responses. Reject questions that have too much online presence, or be prepared for getting that back as answers. Presumably the test isn't about effective online searches.
Third, give up the idea of asking students for facts. That is obvious, I'd think, as facts are cheap. But even facts requiring computation, such as in mathematics or statistics can be generated with tools such as MatLab or Mathematica.
The best sort of questions, I think, are those that require either or both of interpretation and insight. Questions about the why of things rather than the what and how are much better. However, these are the hardest to create, the hardest to answer, and are likely to have the widest variation in quality from students. To grade them might require quite a lot of interpretation: does this student show any insight at all into the subject? Pass-fail grading can be considered. Repeat attempts can be considered.
As an alternative to an exam, you can consider individual portfolio development by students. Students write or otherwise create some artifacts according to some criteria. Plagiarism concerns come in to play here, of course.
I'll note that honor codes can help to a certain extent, though provide no guarantees. And honor codes created in the moment are probably less effective than those of long standing.
I think a lot of us are dealing with this right now. Here's what I and some of my colleagues are doing.
Open book exams: As a lot of people are saying, there's no practical way to police students' use of outside resources, so don't. Write the exam with the expectation that they are using notes and possibly even Google, and let them know that. You don't want to disadvantage students who think they're being honest!
Interpretive questions: Google is great for facts, but lousy for providing interpretation. As a math instructor, one of my major concerns was the existence of software like Symbolab and Wolfram Alpha that can do most calculations. But there's no software in existence that can solve a decently well-written word problem, or that can explain what particular features of a graph mean in context.
Class-specific questions: One of my colleagues, a history instructor, has the problem that the topics involved in the exam are sufficiently well-studied that interpretations are actually freely available online, and a reasonably clever student would be able to paraphrase well enough to avoid detection. What he's planning to do is to ask the students to relate the topic to the class itself, asking the students to reference in-class discussions in their answers. Because Google has no way to know what was discussed in class, this is pretty robust against cheating.
Image recognition: Google does have reverse-image-search functionality, but it isn't very effective if you made the image yourself. As a result, asking a question that requires students to understand an image can be useful; in my exam, I asked students to supply a function that matched a given graph. It's worth noting that, since images are largely incompatible with screen readers, you might have to be conscious of any disabilities among your students.
Time: If a time limit is important, have the exam available for only slightly longer than that time slot. My exam was two hours long, and I had it available for three hours. That limited the ability for students to communicate questions to each other, and it also allowed some flexibility for students running into technical problems. Personally, if possible, I recommend just writing an untimed exam, written with the expectation that students might be communicating with each other.
Justification: Most students do a very poor job of explaining reasoning that isn't their own -- use that. If an exam problem requires students to justify their answer, it's that much harder for them to get answers from one another.
I thought this might be useful as I haven't seen it posted yet.
One idea I have seen professors deploy (I am a PhD student so I sometimes get to help think of these things) is to introduce some complication into the test. Some ways I've seen this done (and some ways it's being done to me this semester):
Open book, harder problems
The idea behind this one is to tackle the problem you pointed out directly - how to make a test a test while more-or-less being forced into an open book scenario. In this option, you would simply increase the difficulty of your test appreciably. Perhaps have some questions that, when answered correctly, would confer a C (or equivalent) grade. For the other questions make them incrementally harder. The idea here is to ensure the student is learning something. One way to do that is to push them modestly outside their comfort zone with questions that can't be simply looked up in their text. My program is Computer Science. One way this could be done in my field is to, instead of requiring a student to demonstrate the steps of an algorithm, prove something small. Maybe an example of proving an invariant of something, or a challenging application to something they learned in class. Enforcing a time constraint would be very difficult for someone unless you had a proctor for each individual.
Open book, research
Ask the students to interpret something they've learned in class in perhaps a new light. Depending on the course level you are teaching this could be something very basic all the way to something a PhD student might be expected to do in their research (obviously it must be attainable and reasonable - but I think you get the idea). Again, unfortunately enforcing a time constraint without a proctor would be difficult.
Both of them require more work from you unfortunately. At my level I have not seen any timed online tests mostly because the infrastructure just isn't available to be spun up quickly for classes that weren't already doing it. Additionally, the material is quite complicated and doesn't lend itself well to chunking out into online questions that a computer could grade.
Good luck!