Switch try except to assertRaises in page load timeout test