modified to collect screen captures immediately prior to every click event