MT#3435 add screenshots (in tests)

to aid in better understanding when tests fail
(selenium tests)
MT#4871 use wait_for_page_to_load

which uses javascript to check if a page has finished loading
(selenium tests)