test iOS app with real device , driver.quit() throw exception
See original GitHub issueDescription
when i test iOS app with real device, the afterTest() method throw exception. but this method is success in version 1.5.3.
Environment
java client build version: 4.1.2 Appium server version: 1.6.0-beta1 Desktop OS: OSX El Capitan 10.11.6 Node.js version 6.5.0 Mobile platform/version under test: iOS Real device or emulator/simulator: real device
Details
test iOS app with real device, the beforeTest() method and the test are correct. But run to the afterTest ,“driver.quit();” method throw a webdriverException.
Code To Reproduce Issue [ Good To Have ]
`public class SimpleTest {
private static IOSDriver<MobileElement> driver;
private String deviceName;
private String platformName;
private String platformVersion;
private String udid;
private String app;
private String bundleId;
@Test public void testLogin() { System.out.println(driver.getPageSource()); }
@BeforeClass public void beforeClass() throws InterruptedException {
deviceName = "iPhone5s";
platformName = "iOS";
platformVersion = "9.3";
udid = "26378cb9bca6165915278f7afb38aa0b432c5381";
app = "/Users/gaojiewen/Library/Developer/Xcode/DerivedData/"
+ "语音信箱-efrgkaqmpsyueggibdtnqonlpuun/Build/Products/Debug-iphoneos/Voicemail.app";
bundleId = "com.voicemail.iflyzunhong";
DesiredCapabilities ca = new DesiredCapabilities();
ca.setCapability(MobileCapabilityType.DEVICE_NAME, deviceName);
ca.setCapability(MobileCapabilityType.PLATFORM_NAME, platformName);
ca.setCapability(MobileCapabilityType.PLATFORM_VERSION, platformVersion);
ca.setCapability(MobileCapabilityType.APP, app);
ca.setCapability(IOSMobileCapabilityType.BUNDLE_ID, bundleId);
ca.setCapability(MobileCapabilityType.UDID, udid);
ca.setCapability(MobileCapabilityType.NO_RESET, Boolean.TRUE);
driver = new IOSDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), ca);
}
@AfterClass public void afterClass() { driver.quit(); } }`
Ecxeption stacktraces
https://gist.github.com/wenshi11019/835929f91f567f4bcc85cade28f960aa
Link to Appium logs
https://gist.github.com/wenshi11019/e50f6ad517c7c83ea6f64afea575decb
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
It looks like you are deploying the wrong file. .app files only work with the simulator. You will need to build an ipa file and use that for your real device.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.