updated screenshot test to wait for the file to be created