appium / appium

Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol
http://appium.io/
Apache License 2.0
18.98k stars 6.08k forks source link

iPad Simulator exiting #2053

Closed appiumuser closed 10 years ago

appiumuser commented 10 years ago

Hi,

I am trying to execute my testcases on iPad Simulator, I am using Appium 0.16.0, xCode 5. My scripts were executing earlier. Once I updated with latest version of appium, it does not click on the native elements present on iPadSimulator i.e tabbar on the bottom, however it launches the app and though the element is found it does not click and it is exited. Below is the trace from appium

info: [INST] 2014-03-12 20:11:50 +0000 Debug: target.setDeviceOrientation("1") 2014-03-12 20:11:51 +0000 Debug: target.frontMostApp().elements()[0].elements()[5].tap() 2014-03-12 20:11:55 +0000 Debug: target.frontMostApp().elements()[0].elements()[3].elements()[5].tap() 2014-03-12 20:11:55 +0000 Debug: target.frontMostApp().elements()[0].elements()[3].elements()[5] could not be tapped 2014-03-12 20:11:55 +0000 Stopped: Script was stopped by the user Instruments Trace Complete (Duration : 18.205872s; Output : /Applications/Appium.app/Contents/Resources/node_modules/appium/instrumentscli19.trace)

info: [INSTSERVER] Instruments exited with code 0

info: Cleaning up after instruments exit info: [INSTSERVER] Closing instruments client socket due to exit info: Stopping iOS log capture info: Killing the simulator process info: Killing any other simulator daemons

info: [INSTSERVER] Instruments socket server was closed

info: Cleaning app state.

I execute my tests using TestNG in Eclipse, I am encountering the below error

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 237 milliseconds Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:55:11'

Please let me know if this is a bug or it can be fixed.

Thanks.

jlipps commented 10 years ago

Sometimes instruments doesn't like clicking on certain elements. What kind of element is it?

appiumuser commented 10 years ago

Its Native button present on tabbar bottom, and I take the xpath from Appium inspector which is wd.findElement(By.xpath("//window[1]/tabbar[1]/button[contains(@label, 'Lists')]")).click(); and it does not identify, it launches apps and then exits..

Along with this now I get another issue too in xcode when I execute tests "ios Simulator failed to install the application", this message is seen only once in a while. I am continously trying with different testscripts, same WebDriverException though.

appiumuser commented 10 years ago

Also I see the following error message in Appium

error: uncaughtException: write EPIPE date=Wed Mar 12 2014 15:21:07 GMT-0700 (PDT), pid=2746, uid=501, gid=20, cwd=/Applications/Appium.app/Contents/Resources/node_modules/appium, execPath=/Applications/Appium.app/Contents/Resources/node/bin/node, version=v0.10.17, argv=[/Applications/Appium.app/Contents/Resources/node/bin/node, /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/main.js, --port, keep-artifacts, --device-name, iPad], rss=59285504, heapTotal=55116032, heapUsed=20788256, loadavg=[1.1142578125, 0.990234375, 0.9169921875], uptime=5242, trace=[column=11, file=net.js, function=errnoException, line=901, method=null, native=false, column=19, file=net.js, function=Object.afterWrite, line=718, method=afterWrite, native=false], stack=[Error: write EPIPE, at errnoException (net.js:901:11), at Object.afterWrite (net.js:718:19)]

jlipps commented 10 years ago

Are you still seeing this with 0.17.6?

appiumuser commented 10 years ago

I have installed homebrew and node.js, however after updating appium to 0.17.6, it launches iPad Retina simulator instead of iPad and I get the below log in appium

debug: Appium request initiated at /wd/hub/session/a4607915-4db1-4c27-bae3-dd3b047ac8c0/element/0/click

info: Pushing command to appium work queue: "au.tapById('0')"

debug: Request received with params: {"id":"0"} debug: Sending command to instruments: au.tapById('0')

info: [INSTSERVER] Sending command to instruments: au.tapById('0')

info: [INST] 2014-03-24 22:15:37 +0000 Debug: target.frontMostApp().elements()[0].elements()[5].tap()

info: [INSTSERVER] Socket data received (50 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event info: [INSTSERVER] Got result from instruments: {"status":0,"value":null} info: Responding to client with success: {"status":0,"value":null,"sessionId":"a4607915-4db1-4c27-bae3-dd3b047ac8c0"} POST /wd/hub/session/a4607915-4db1-4c27-bae3-dd3b047ac8c0/element/0/click 200 380ms - 89b

debug: Appium request initiated at /wd/hub/session/a4607915-4db1-4c27-bae3-dd3b047ac8c0/window_handles

info: [REMOTE] Debugger socket connected to ::1:27753

debug: Request received with params: {} debug: [REMOTE] Sending _rpc_reportIdentifier: message to remote debugger debug: [REMOTE] {"argument":{"WIRConnectionIdentifierKey":"bd31c794-927b-4b1c-8b31-e7bca0295366"},"selector":"_rpc_reportIdentifier:"} debug: [REMOTE] Receiving data from remote debugger debug: [REMOTE] Receiving data from remote debugger debug: [REMOTE] {"selector":"_rpc_reportSetup:","argument":{"WIRSimulatorNameKey":"iPad Simulator","WIRSimulatorProductVersionKey":"7.1","WIRSimulatorBuildKey":"11D167"}} debug: [REMOTE] Sim name: iPad Simulator debug: [REMOTE] Sim build: 11D167 debug: [REMOTE] {"selector":"_rpc_reportConnectedApplicationList:","argument":{"WIRApplicationDictionaryKey":{"com.kohls.mcommerce.ipad":{"WIRApplicationIdentifierKey":"com.kohls.mcommerce.ipad","WIRApplicationNameKey":"Kohl's","WIRIsApplicationProxyKey":false}}}} debug: [REMOTE] Sending _rpc_forwardGetListing: message to remote debugger debug: [REMOTE] {"argument":{"WIRConnectionIdentifierKey":"bd31c794-927b-4b1c-8b31-e7bca0295366","WIRApplicationIdentifierKey":"com.kohls.mcommerce.ipad"},"selector":"_rpc_forwardGetListing:"}

info: [REMOTE] Sending connection key info: [REMOTE] Selecting app

debug: [REMOTE] Receiving data from remote debugger

debug: [REMOTE] {"selector":"_rpc_applicationDisconnected:","argument":{"WIRApplicationIdentifierKey":"com.kohls.mcommerce.ipad","WIRApplicationNameKey":"Kohl's","WIRIsApplicationProxyKey":false}}

info: [INST] 2014-03-24 22:15:40 +0000 Fail: The target application appears to have died

info: [INST] Instruments Trace Complete (Duration : 22.761873s; Output : /Applications/Appium.app/Contents/Resources/node_modules/appium/instrumentscli19.trace)

info: [INSTSERVER] Instruments exited with code 0

info: Cleaning up after instruments exit info: [INSTSERVER] Closing instruments client socket due to exit info: Instruments exited unexpectedly info: Stopping iOS log capture info: [REMOTE] Disconnecting from remote debugger info: Killing the simulator process

info: [INSTSERVER] Instruments socket server was closed

info: [REMOTE] Debugger socket disconnected

info: Killing any other simulator daemons

info: Cleaning app state.

info: Deleted /Users/MacBook/Library/Application Support/iPhone Simulator/7.1/Applications

info: Deleted /Users/MacBook/Library/Application Support/iPhone Simulator/7.1/Library/TCC info: Deleted /Users/MacBook/Library/Application Support/iPhone Simulator/7.1/Library/Caches/locationd

info: Deleted /Users/MacBook/Library/Application Support/iPhone Simulator/7.1/Media info: Deleted /Users/MacBook/Library/Application Support/iPhone Simulator/7.1/Library/Keychains info: Cleaning up appium session

info: Pushing command to appium work queue: "au.alertIsPresent()"

debug: Appium request initiated at /wd/hub/status

info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.17.6","revision":"7b32947e166a4338047f31ac14457c2b0eb432aa"}}}

Thanks.

jlipps commented 10 years ago

The issue of which device is launching will be fixed in https://github.com/appium/appium/issues/2149. The main issue you're experiencing is here:

info: [INST] 2014-03-24 22:15:40 +0000 Fail: The target application appears to have died

Unfortunately this isn't an Appium problem, it means your app crashed.

lock[bot] commented 5 years ago

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.