Added checkIsShown parameter to waitForView()