Close unexpected alerts before taking screenshot