Added method for screenshot and page refresh