Workaround Appium bug with window handles