Another attempt to resolve intermittent JS test failure

Added an explicit five second wait after clicking a javascript link to leave time for dom changes.