Added the new method waitForActivityStackToBeEmpty