driver.get() and driver.click() (last one in most cases) is already a blocking call, which means that among other things it checks for document.readyState
to be complete
, so I am afraid that the expected condition that you have implemented has no value whatsoever. Anyway, in my mind, the concept of "page has finished loading" does not anymore since the last days of static html or the days when JS was introduced. I mean, there is async stuff going on all the time.. That being said, if you are able to concretely define the moment when the page has finished loading, then wait for that very thing.
BR
erki.