retry getting a session in appium tests (fix #1326)