Prevent modal dialogue appearing in test without compromising live use.