Viewing attached documents in Composer form gives an error "Leave the page or stay on this page?" is displayed instead of the attached file. User must hit Leave Page to show attached file but should launch the file when clicked on it.
This issue could appear if as per Company's Policy Pop Ups are blocked.
This can be resolved by performing below steps.
1) On the Browser -Click on Settings- PopUp Blocker- Allow.
For Chrome setup will be under Settings- Advance Settings- Content-Popups.
2) Click on internet options -General tab - Click on tabs button and then Select option Open new window.
3) Go to the properties of the attachment control. There is a property named target; give its value as _blank and then redeploy the solution and then rerun the scenario.
4) Clear the Cache and Redeploy the solution.