org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: XPath parse error) (WARNING: The server did not provide any stacktrace information)
--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: XPath parse error) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 20.49 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'
Session ID: 3eb9248e-20c7-4668-8d67-1db4bb2e513a
Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver
Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, device=Android, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=Android, warnings={}, takesScreenshot=true}]
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:554)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:404)
at org.openqa.selenium.By$ByXPath.findElement(By.java:363)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at com.example.webexample.test.TestScript.apiDemo(TestScript.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: XPath parse error) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 20.41 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'
Session ID: 38efd72a-f007-4f38-ad57-87a5ec8af2f7
Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver
Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Selendroid, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Selendroid, appActivity=.MainAcivtiy, device=Android, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=Android, warnings={}, takesScreenshot=true}]
Hi,
this is my class. even it is throwing exceptionpublic class TestScript {public static WebDriver driver;public static Runtime rt = Runtime.getRuntime();public static Process proc;static File filename;static PrintWriter fw;private static Properties p;static InputStream is;public void loadData() throws IOException {if (filename == null)filename = new File("Report.txt");fw = new PrintWriter(filename);is = new FileInputStream("pageFile.properties");p = new Properties();p.load(is);}@Beforepublic void setUp() throws Exception {loadData();File app = new File("/home/prabhjeet/workspace/WebExample/bin/WebExample.apk");DesiredCapabilities capabilities = new DesiredCapabilities();capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability("device", "Android");
On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Bad app: /LN/Softwares/APP_Files/Builds_26_04_14/myApp_26_04_14.ipa. 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. cause: App zip unzipped OK, but we couldn't find a .app bundle in it. Make sure your archive contains the .app package and nothing else)","origValue":"Bad app: /LN/Softwares/APP_Files/Builds_26_04_14/myApp_26_04_14.ipa. 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. cause: App zip unzipped OK, but we couldn't find a .app bundle in it. Make sure your archive contains the .app package and nothing else"},"sessionId":null}
POST /wd/hub/session 500 122ms - 844b
I tried the following:
^CFWWMACs-Mac-mini:~ FWWMAC$ appium -a 127.0.0.1 -p 4723
info: Welcome to Appium v0.18.2 (REV 42bf11ab933185316a57ffa7f283f184ea4635b8)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: socket.io started
info: Non-default server args: {"address":"127.0.0.1","merciful":true}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"}}
info: Using local app from desired caps: /TestApp.app
info: Creating new appium session 95cfbe67-2f3f-4424-9695-fa6043e066dc
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
info: Cleaning up any tracedirs
info: Cleaned up /usr/local/lib/node_modules/appium/instrumentscli0.trace
info: Setting Xcode folder
info: Setting Xcode version
info: Setting iOS SDK Version
info: iOS SDK Version set to 7.1
info: Detecting automation tracetemplate
info: Not auto-detecting udid, running on sim
warn: Could not parse plist file at /TestApp.app/en.lproj/Localizable.strings
info: Not setting locale
debug: Creating instruments
info: No iOS / app preferences to set
info: Starting iOS 7.* simulator log capture
info: Killing the simulator process
info: Killing any other simulator daemons
debug: Checking whether instruments supports our device string
info: Getting list of devices instruments supports
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Cleaning app state.
info: No folders found to remove
debug: No device id or app, not installing to real device.
debug: Starting instruments
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Attempting to run app on iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1 /TestApp.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}
info: And launch timeouts (in ms): {"global":90000}
info: [INST STDERR] 2014-04-29 13:38:29.130 ScriptAgent[1350:3007] CLTilesManagerClient: initialize, sSharedTilesManagerClient
info: [INST STDERR] 2014-04-29 13:38:29.131 ScriptAgent[1350:3007] CLTilesManagerClient: init
info: [INST STDERR] 2014-04-29 13:38:29.131 ScriptAgent[1350:3007] CLTilesManagerClient: reconnecting, 0x10a427610
info: [INST STDERR] 2014-04-29 13:38:29.980 ScriptAgent[1350:3007] AX Lookup problem! 1102 com.apple.iphone.axserver:1339
info: [INST] 2014-04-29 08:08:30 +0000 Start: Bootstrapping uiauto
info: [INST] 2014-04-29 08:08:31 +0000 Start: Got user: FWWMAC
info: [INST] 2014-04-29 08:08:31 +0000 Start: Not using settings file.
info: [INST] 2014-04-29 08:08:31 +0000 Start: isVerbose:false
info: [INST] 2014-04-29 08:08:35 +0000 Start: Using node at: /usr/local/Cellar/node/0.10.26/bin/node
info: [INSTSERVER] Instruments is ready to receive commands
info: Instruments launched. Starting poll loop for new commands.
info: Pushing command to appium work queue: "au.bundleId()"
debug: Sending command to instruments: au.bundleId()
info: [INSTSERVER] Socket data received (15 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Sending command to instruments: au.bundleId()
info: [INSTSERVER] Socket data received (57 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":"D.TestApp"}
info: Bundle ID for open app is D.TestApp
info: Setting bootstrap config keys/values
info: Pushing command to appium work queue: "setBootstrapConfig: autoAcceptAlerts=false"
debug: Sending command to instruments: setBootstrapConfig: autoAcceptAlerts=false
info: [INSTSERVER] Sending command to instruments: setBootstrapConfig: autoAcceptAlerts=false
info: [INSTSERVER] Socket data received (57 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":"D.TestApp"}
info: Setting initial orientation to PORTRAIT
info: Pushing command to appium work queue: "au.setScreenOrientation('PORTRAIT')"
debug: Sending command to instruments: au.setScreenOrientation('PORTRAIT')
info: [INSTSERVER] Sending command to instruments: au.setScreenOrientation('PORTRAIT')
info: [INST] 2014-04-29 08:08:35 +0000 Debug: target.setDeviceOrientation("1")
info: [INSTSERVER] Socket data received (56 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":"PORTRAIT"}
info: Device launched! Ready for commands
info: Setting command timeout to the default of 60 secs
info: Appium session started with sessionId 95cfbe67-2f3f-4424-9695-fa6043e066dc
POST /wd/hub/session 303 21841ms - 9b
debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc
debug: Request received with params: {"desiredCapabilities":{"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"}}
info: Responding to client with success: {"status":0,"value":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"iOS","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"warnings":{},"desired":{"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"},"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"},"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}
GET /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc 200 3ms - 618b
debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element
debug: Request received with params: {"using":"-ios uiautomation","value":".textFields()[\"TextField1\"];"}
info: Pushing command to appium work queue: "au.getElementByUIAutomation('.textFields()[\\\"TextField1\\\"];')"
debug: Sending command to instruments: au.getElementByUIAutomation('.textFields()[\"TextField1\"];')
info: [INSTSERVER] Sending command to instruments: au.getElementByUIAutomation('.textFields()[\"TextField1\"];')
info: [INSTSERVER] Socket data received (61 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":{"ELEMENT":"0"}}
info: Responding to client with success: {"status":0,"value":{"ELEMENT":"0"},"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}
POST /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element 200 1131ms - 109b
debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element/0/value
debug: Request received with params: {"value":["9"]}
info: Pushing command to appium work queue: "au.getElement('0').setValueByType('9')"
debug: Sending command to instruments: au.getElement('0').setValueByType('9')
info: [INSTSERVER] Sending command to instruments: au.getElement('0').setValueByType('9')
info: [INST STDERR] 2014-04-29 13:38:37.418 ScriptAgent[1350:3007] Log written to /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/Logs/CrashReporter/UIALogs/ScriptError-2014-04-29-133837.plist
info: [INSTSERVER] Socket data received (51 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":17,"value":"10"}
info: Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"10"},"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}
POST /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element/0/value 500 117ms - 191b
debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc
debug: Request received with params: {}
info: Shutting down appium session...
info: Stopping ios
info: Sending sigterm to instruments
info: [INST] 2014-04-29 08:08:37 +0000 Stopped: Script was stopped by the user
info: [INST] Instruments Trace Complete (Duration : 17.669607s; Output : /usr/local/lib/node_modules/appium/instrumentscli0.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: [INSTSERVER] Instruments socket server was closed
info: Killing any other simulator daemons
info: Cleaning app state.
info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Applications
info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/TCC
info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/Caches/locationd
info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Media
info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/Keychains
info: Cleaning up appium session
info: Responding to client with success: {"status":0,"value":null,"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}
DELETE /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc 200 404ms - 89b