#241: waiting for the page to be loaded before activating functions that are wrapped inside waitForPage