Handle modal dialogue which will block all tests in the cms

updated as an afterScenario event