I want to run automation test on real devices, earlier i did this on emulators (API>17) but the same test i was trying to run on Appium in selendroid mode it failed.
Below is the capabilities i configured for appium to run in selendroid mode.
Appium Version : 1.0
Selendroid Version: 0.10
I run appium on port no : 6001 and bootstrap port : 4001, And selendroid server run on default port : 8080
private static String url = "http://localhost:"
+ System.getProperty("appium_port") + "/wd/hub";
private AppiumDriver driver;
private static DesiredCapabilities capabilities;
capabilities = new DesiredCapabilities();
File app = new File("en-android.apk");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Selendroid");
capabilities.setCapability(CapabilityType.PLATFORM, "ANDROID");
capabilities.setCapability("device", "Selendroid");
capabilities.setCapability("platformVersion", "4.1.2");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("app-activity",
"testapp.android.gui.WelcomeActivity");
capabilities.setCapability("app-package",
"testapp.android");
driver = new AppiumDriver(new URL(url), capabilities);
Below is Applium server logs.
Appium Log:
error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device.
info: Stopping logcat capture
debug: Logcat terminated with code null, signal SIGTERM
info: Sent shutdown command, waiting for UiAutomator to stop...
warn: UiAutomator did not shut down fast enough, calling it gone
info: Cleaning up android objects
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device.
info: Error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device.
at /home/priyankpshah/.linuxbrew/lib/node_modules/appium/lib/devices/android/android.js:263:17
at /home/priyankpshah/.linuxbrew/lib/node_modules/appium/lib/devices/android/adb.js:630:7
at /home/priyankpshah/.linuxbrew/lib/node_modules/appium/lib/devices/android/adb.js:154:5
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device.)","origValue":"Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device."},"sessionId":null}
POST /wd/hub/session 500 7269ms - 400b
Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 8.198 sec <<< FAILURE! - in TestSuite
setUp(com.ishisystems.enigma.EnigmaLaunchTest) Time elapsed: 8.084 sec <<< FAILURE!
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device.) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 7.41 seconds
Build info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
System info: host: 'ishiahm-lt113', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version: '1.7.0_55'
Driver info: io.appium.java_client.AppiumDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:76)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:41)
at TestUtility.automationInit(TestUtility.java:41)
at LaunchTest.setUp(LaunchTest.java:33)
Please let me know is there any specific changes need to be made to run appium tests on selendroid mode on real devices.
Thanks,
Priyank P Shah
If you are using Appium 1.0 use capability 'automationName' instead of device.
E.G.
capabilities.setCapability("automationName", "Selendroid");
instead of
capabilities.setCapability("device", "Selendroid");
For appium versions less than 1.0 beta , you can continue with 'device' capability.
Related
I am trying to execute simple java selenium script to automation ios application in Mac, getting error
an unknown server-side error occurred while processing the command.
Original error: Unable to launch WebDriverAgent because of xcodebuild
failure: Command 'carthage bootstrap --platform iOS' exited with code
Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md.
Try to remove the WebDriverAgentRunner application from the device if
it is installed and reboot the device.
Versions of SW used:
Mac OS Ventura 13.1
Appium 1.15.0
NodeJS 11.13
Npm 6.4.1
Java 19.0.1
Xcode 14.2
Eclipse 4.26
Build success in XCode with team id and signing properties set, also was able to execute sample 'IntegrationApp' successfully on real mobile device.
Below are capabilities used:
`DesiredCapabilities cap=new DesiredCapabilities();
cap.setCapability("platformName", "iOS");
cap.setCapability("platformVersion", "15.5");
cap.setCapability("deviceName", "iPhone 13 mini");
cap.setCapability("udid", "00008110-000C714821D0401E");
cap.setCapability("app",
"/Users/devadmin/eclipse/ws2/ts1/src/test/resources/Facebook/Facebook_278.0.ipa");
cap.setCapability("--session-override", true);
cap.setCapability("xcodeOrgId", "Darpan Lad");
cap.setCapability("xcodeSigningId", "iPhone Developer");
cap.setCapability("WDAlaunchTimeOut", Duration.ofSeconds(20));
cap.setCapability("updatedWDABundleId", "com.fb.WebDriverAgentLib");
cap.setCapability("bundleId", "com.facebook.katana");
cap.setCapability("clearSystemFiles", true);
IOSDriver driver = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"),cap);`
Getting below error:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS' exited with code 1. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'INGNBHLP01241', ip: '2401:4900:1f26:5475:9ddc:aae0:72e:5356%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.1', java.version: '17.0.5'
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS' exited with code 1. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:388:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'INGNBHLP01241', ip: '2401:4900:1f26:5475:9ddc:aae0:72e:5356%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.1', java.version: '17.0.5'
Driver info: driver.version: IOSDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
at org.openqa.selenium.remote.RemoteWebDriver.\<init\>(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.\<init\>(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.\<init\>(AppiumDriver.java:88)
at io.appium.java_client.AppiumDriver.\<init\>(AppiumDriver.java:98)
at io.appium.java_client.ios.IOSDriver.\<init\>(IOSDriver.java:90)
at ts1.iostest1.main(iostest1.java:48)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
14 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS' exited with code 1. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'INGNBHLP01241', ip: '2401:4900:1f26:5475:9ddc:aae0:72e:5356%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.1', java.version: '17.0.5'
Driver info: driver.version: IOSDriver
remote stacktrace: **UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS' exited with code 1**. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:388:37)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
Tried changing different versions of Appium 1.22, 1.12, 1.15.
Changed Node JS versions
but no luck in executing script
The problem
An unknown server-side error occurred while processing the command. Original error: Did not get any response after 300s
Environment
Appium version (or git revision) that exhibits the issue: 1.15.0/1.15.1
Desktop OS/version used to run Appium: mac OS 10.15.1
Node.js version (unless using Appium.app|exe): v13.2.0
Npm or Yarn package manager: 6.13.1
Mobile platform/version under test: iOS 13.1.2
Real device or emulator/simulator: iPhone X
Details
I run web testing on iOS 13.1.2. The previous steps can be implemented without error. while it implemented CLICK command. It took about 10 mins and reported the error above.
I used to use Appium 1.15.1 and now downgrade to 1.15.0. I also tried to upgraded and downgraded the Katalon Studio Version but the issue still occurs.
Test Cases/Mobile/M-Queenb - Login FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/Mobile - Login/Page_Home Decor Online Store queen/a_Categories'
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:79)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:42)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:60)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)
at M-Queenb - Login.run(M-Queenb - Login:34)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1574827926297.run(TempTestCase1574827926297.groovy:23)
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Did not get any response after 300s
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'PACMAN.ecommistry.com', ip: 'fe80:0:0:0:1887:6d13:ace3:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_181'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {automationName: XCUITest, browserName: Safari, databaseEnabled: false, deviceName: test, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 1800, platform: MAC, platformName: iOS, platformVersion: 13.1.2, realDeviceLogger: /Applications/Katalon Studi..., takesScreenshot: true, udid: 0f040a74e28d16c7291dcc3eca2..., wdaLocalPort: 62547, webStorageEnabled: false}
Session ID: e38d6851-f76b-4815-8cea-1362dead6450
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:45)
at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
at io.appium.java_client.ios.IOSElement.execute(IOSElement.java:1)
at org.openqa.selenium.remote.RemoteWebElement.isDisplayed(RemoteWebElement.java:326)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
at com.sun.proxy.$Proxy10.isDisplayed(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.isDisplayed(EventFiringWebDriver.java:470)
at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:314)
at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:43)
at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:300)
at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:297)
at org.openqa.selenium.support.ui.ExpectedConditions$23.apply(ExpectedConditions.java:670)
at org.openqa.selenium.support.ui.ExpectedConditions$23.apply(ExpectedConditions.java:666)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:56)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20) ```
The following worked for me:
I'm using latest Appium, which is v1.16.0 at the time of writing this. There are several locations where appium-webdriveragent is installed. I realised the one in /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent was not latest version, so I upgraded it to latest (v2.5.4 in my case) as follows:
cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules
mv appium-webdriveragent appium-webdriveragent.prev # fallback
npm i appium-webdriveragent
cd appium-webdriveragent
mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh -d
open -a xcode WebDriverAgent.xcodeproj
In Xcode, ensure that 'Signing and Capabilities' for the 'WebDriverAgentLib' and 'WebDriverAgentRunner' projects have correct 'team' and 'signing certificate' (more info: http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/ ). Then build 'WebDriverAgentRunner > nameOfYouriOSoriPadOSDevice' - ensure build is successful. Now try to run a test - the 'response within 300 seconds' error should not occur anymore.
I am new in iOS automation and using Appium command line for this. I have script ready to launch the app(Integration app) in real device and Whenever I run the script in Eclipse, I keep getting the following error when running the scripts:
Exception in thread "main" org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command.
Original error: Could not install app: 'Command 'ios-deploy --id
f31936d8edc3b8f880254efd02006273e81f5b --bundle
/Users/eeposit/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/IntegrationApp.app'
exited with code 253' (WARNING: The server did not provide any
stacktrace information)
Command duration or timeout: 9.97 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z'
System info: host: 'eeposits-Mac-mini-2.local', ip: '192.168.0.106', os.name: 'Mac OS X', os.arch: 'x86_64', os.version:
'10.13.2', java.version: '9.0.1'
Driver info: driver.version: IOSDriver
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:476)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:83)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:93)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:78)
at FirstiOS.iosautomate.main(iosautomate.java:43)
I have successfully installed the command [ npm install -g ios-deploy ] too but still the error is shown.
So, below are the capabilities that I have added.
capabilities.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.7.2");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.3.3");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 5s");
capabilities.setCapability(MobileCapabilityType.UDID, "f31936d8edc3b8f880254efd02006273e81f5b");
capabilities.setCapability(MobileCapabilityType.APP, "/Users/eeposit/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/IntegrationApp.app");
capabilities.setCapability("bundleId", "com.facebook.IntegrationApp");
capabilities.setCapability(IOSMobileCapabilityType.LAUNCH_TIMEOUT, 500000);
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
Please go through the image of the appium logs too that I have attached here: Appium logs
[XCUITest] Error: Could not install app Command 'ios-deploy --id...exited with code 253
Any suggestions or help ?
It looks like you're attempting to install a simulator build onto a real device. You'll need to build for the proper architecture of the device that you want to test on, and then update your MobileCapabilityType.APP value to match. Something like:
"/Users/.../Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/IntegrationApp.app");
This error message is discussed at some length in Appium's issue tracker here.
I am working on iPhone automation using selenium webdriver, appium & ios webkit debug proxy.
Configurations:
OS X Version 10.11.2
Appium 1.3.5
Xcode: 7.2
Device: iPhone 6[9.2]
I have installed safariLauncher app in iPhone using Xcode.
Steps:
I launched appium through terminal.
Cmd: Appium &
Then launched ios-webkit-debug-proxy.
Cmd: ./bin/ios-webkit-debug-proxy-launcher.js -c [device udid]:27753 -d
I launch appium & webkit server every time before starting any test case execution.
Only the first test case works fine and 2nd test case onward run into below error in appium log:
code error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at Instruments.onInstrumentsExit (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:389:31)
at null.<anonymous> (/usr/local/lib/node_modules/appium/node_modules/appium-instruments/lib/instruments.js:308:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
info: <-- POST /wd/hub/session 500 153251.340 ms - 182
Please suggest any solution.
I have a problem with my automated tests on iPhone 5. I could previously start test on iPad with iOS 6.1 but now I would like to do it on iPhone 5 iOS 8.1
In eclipse I got message A new session could not be created.
Log from appium:
error: Failed to start an Appium session, err was: Error: App did not have elements
info: [debug] Error: App did not have elements
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ ios.js:459:30
at Object.cb [as callback] (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios /ios-controller.js:247:7)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:801:43)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:32:16
at exports.respond (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:28:9)
at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1449:18)
at getResultAndSendNext (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/lib/command-proxy.js:146:20)
at Socket.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/lib/command-proxy.js:88:7)
at Socket.emit (events.js:117:20)
at _stream_readable.js:944:16
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: App did not have elements)","origValue":"App did not have elements"},"sessionId":null}
info: <-- POST /wd/hub/session 500 29025.843 ms - 172
capabilities:
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "8.1");
capabilities.setCapability("deviceName", "iPhone 5 iOS 8.1");
capabilities.setCapability("udid","104ce995950282f9dfaf371bf05ee6b00e7c0027);
Can anybody help me?
Beginning iOS 8, excessive amount of NSLog outputs can create deadlock in the internal communication of UIAutomation and Appium server. (read this article for more info Appium's Github page)
This causes such undesired outcomes.
A preventive workaround is described HERE: which solved the issue on my case. I hope it will help.