In Appium 1.5.3, unable to launch Safari in iOS
See original GitHub issueThe problem
I am trying to automate mobile web application in iOS. For that I need to launch safari.
Environment
- Appium version (or git revision) that exhibits the issue: 1.5.3
- Desktop OS/version used to run Appium: osx 10.11.5
- Node.js version (unless using Appium.app|exe): 4.5.0
- Mobile platform/version under test:
- Real device or emulator/simulator: simulator
- Appium CLI or Appium.app|exe: node appium
Details
[iOS] Error: Command failed: /bin/sh -c ideviceinstaller -u D2895B69-8825-4581-9ED1-22ACB4BC3AAC -l
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:486:12)
{ [Error: Command failed: /bin/sh -c ideviceinstaller -u D2895B69-8825-4581-9ED1-22ACB4BC3AAC -l ] cause: { [Error: Command failed: /bin/sh -c ideviceinstaller -u D2895B69-8825-4581-9ED1-22ACB4BC3AAC -l ] killed: false, code: 2, signal: null, cmd: '/bin/sh -c ideviceinstaller -u D2895B69-8825-4581-9ED1-22ACB4BC3AAC -l ’ }, isOperational: true, killed: false, code: 2, signal: null, cmd: '/bin/sh -c ideviceinstaller -u D2895B69-8825-4581-9ED1-22ACB4BC3AAC -l ’ } [iOS] Bad app: ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app’. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. [MJSONWP] Encountered internal error running command: Error: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
Seems there are 2 errors. 1st is: Command failed: /bin/sh -c ideviceinstaller -u D2895B69-8825-4581-9ED1-22ACB4BC3AAC -l 2nd is: Bad app: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app There is not SafariLauncher.app in the path. Even if I build SafariLauncher myself and put it to the path, still no work.
Link to Appium logs
Create a gist which is a paste of your full Appium logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
I use java, and the test code: public class DebugIOSTest { protected Logger logger = LoggerFactory.getLogger(getClass());
protected MobileDriver driver;
@Test
public void test() throws MalformedURLException {
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone Simulator");
// desiredCapabilities.setCapability(“bundleId”, “com.apple.mobilesafari”); // desiredCapabilities.setCapability(“udid”, “81efb4eadca74ab261864f3e4252cb10fe4bc8df”); desiredCapabilities.setCapability(“udid”, “D2895B69-8825-4581-9ED1-22ACB4BC3AAC”);
desiredCapabilities.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.SAFARI);
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.3");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
this.driver = new IOSDriver<IOSElement>(url, desiredCapabilities);
driver.get("http://www.baidu.com");
System.out.println(driver.getPageSource());
}
@AfterClass(alwaysRun = true)
public void afterClass() {
driver.quit();
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Do not specify a udid if this is a simulator test. The system is trying to install on a real device.
On Tuesday, September 27, 2016, ReinhardXu2007 notifications@github.com wrote:
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.