refactor screenshots to work for all pages