Moving take screenshot method to the Page class.