Minor modification in waitForDialogToOpen()
Bugfix for issue-527
Bugfix for issue-538
Catch exception in clickOnActionBarHomeButton()