Appium-desktop: SetLocation method is not working with Simulator [iOS]

Created on 16 Jul 2020  ·  2Comments  ·  Source: appium/appium-desktop

Appium or Appium Desktop?

Appium
Appium 1.17.1-1
macOS Catalina v 10.15.5
Java Language
Xcode Version 11.5 (11E608c)
iPhone 11 v 13.5

The problem

I am trying to using the SetLocation method, but it is not working with Simulator [iOS].

Environment

Simulator [iOS] - iPhone 11 v 13.5

issue logs

  • I am running Appium Desktop version _ [TestNG] Running:
    /Users/suaadbatis/Library/Caches/JetBrains/IdeaIC2020.1/temp-testng-customsuite.xml

[Appium] Welcome to Appium v1.17.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
[HTTP] <-- GET /wd/hub/status 200 5 ms - 68
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","locationServicesAuthorized":true,"showXcodeLog":true,"platformVersion":"13.5","automationName":"XCuiTest","takesScreenshot":"true","platformName":"iOS","udid":"FF517BC5-4460-49A6-9042-5A750B367BAC","deviceName":"iPhone 11"},"capabilities":{"alwaysMatch":{"appium:app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","appium:automationName":"XCuiTest","appium:deviceName":"iPhone 11","appium:locationServicesAuthorized":true,"platformName":"ios","appium:platformVersion":"13.5","appium:showXcodeLog":true,"takesScreenshot":"true","appium:udid":"FF517BC5-4460-49A6-9042-5A750B367BAC"},"firstMatch":[{}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","locationServicesAuthorized":true,"showXcodeLog":true,"platformVersion":"13.5","automationName":"XCuiTest","takesScreenshot":"true","platformName":"iOS","udid":"FF517BC5-4460-49A6-9042-5A750B367BAC","deviceName":"iPhone 11"},null,{"alwaysMatch":{"appium:app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","appium:automationName":"XCuiTest","appium:deviceName":"iPhone 11","appium:locationServicesAuthorized":true,"platformName":"ios","appium:platformVersion":"13.5","appium:showXcodeLog":true,"takesScreenshot":"true","appium:udid":"FF517BC5-4460-49A6-9042-5A750B367BAC"},"firstMatch":[{}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1594918838311 (20:00:38 GMT+0300 (Arabian Standard Time))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] takesScreenshot
[Appium] Appium v1.17.1 creating new XCUITestDriver (v3.22.0) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "platformName": "ios",
[debug] [BaseDriver] "appium:takesScreenshot": "true",
[debug] [BaseDriver] "appium:app": "/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app",
[debug] [BaseDriver] "appium:automationName": "XCuiTest",
[debug] [BaseDriver] "appium:deviceName": "iPhone 11",
[debug] [BaseDriver] "appium:locationServicesAuthorized": true,
[debug] [BaseDriver] "appium:platformVersion": "13.5",
[debug] [BaseDriver] "appium:showXcodeLog": true,
[debug] [BaseDriver] "appium:udid": "FF517BC5-4460-49A6-9042-5A750B367BAC"
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] takesScreenshot
[BaseDriver] Session created with session id: a3b2ebb5-79ba-453f-b934-897cdb40d6df
[debug] [XCUITest] Current user: 'suaadbatis'
[debug] [XCUITest] Available devices:
[debug] [XCUITest] No real device with udid 'FF517BC5-4460-49A6-9042-5A750B367BAC'. Looking for simulator
[iOSSim] Constructing iOS simulator for Xcode version 11.5 with udid 'FF517BC5-4460-49A6-9042-5A750B367BAC'
[XCUITest] Determining device to run tests on: udid: 'FF517BC5-4460-49A6-9042-5A750B367BAC', real device: false
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1594918839099 (20:00:39 GMT+0300 (Arabian Standard Time))
[BaseDriver] Using local app '/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1594918839101 (20:00:39 GMT+0300 (Arabian Standard Time))
[debug] [XCUITest] Checking whether app '/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app': 'com.peer.udel'
[debug] [BaseDriver] Event 'resetStarted' logged at 1594918839103 (20:00:39 GMT+0300 (Arabian Standard Time))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1594918839290 (20:00:39 GMT+0300 (Arabian Standard Time))
[debug] [IOSSimulatorLog] Starting log capture for iOS Simulator with udid 'FF517BC5-4460-49A6-9042-5A750B367BAC' using simctl
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1594918839686 (20:00:39 GMT+0300 (Arabian Standard Time))
[XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] Setting iOS and app preferences
[debug] [iOSSim] Checking whether simulator has been run before: yes
[debug] [iOS] Setting location services to 1
[debug] [iOS] Authorizing location services for app
[debug] [iOSSim] Updating location client file: /Users/suaadbatis/Library/Developer/CoreSimulator/Devices/FF517BC5-4460-49A6-9042-5A750B367BAC/data/Library/Caches/locationd/clients.plist
[debug] [iOS] Setting did not need to be updated
[debug] [iOSSim] Setting preferences of FF517BC5-4460-49A6-9042-5A750B367BAC Simulator to {"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Updated FF517BC5-4460-49A6-9042-5A750B367BAC Simulator preferences at '/Users/suaadbatis/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"FF517BC5-4460-49A6-9042-5A750B367BAC":{"ConnectHardwareKeyboard":false}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Got Simulator UI client PID: 5004
[iOSSim] Both Simulator with UDID 'FF517BC5-4460-49A6-9042-5A750B367BAC' and the UI client are currently running
[debug] [BaseDriver] Event 'simStarted' logged at 1594918839930 (20:00:39 GMT+0300 (Arabian Standard Time))
[debug] [XCUITest] Verifying application platform
[debug] [XCUITest] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[debug] [XCUITest] Reset requested. Removing app with id 'com.peer.udel' from the device
[debug] [XCUITest] Installing '/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app' on Simulator with UUID 'FF517BC5-4460-49A6-9042-5A750B367BAC'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1594918843539 (20:00:43 GMT+0300 (Arabian Standard Time))
[WebDriverAgent] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent'
[WebDriverAgent] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[debug] [WebDriverAgent] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[DevCon Factory] Requesting connection for device FF517BC5-4460-49A6-9042-5A750B367BAC on local port 8100, device port 8100
[debug] [DevCon Factory] Cached connections count: 0
[DevCon Factory] Successfully requested the connection for FF517BC5-4460-49A6-9042-5A750B367BAC:8100
[debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] "value" : {
[debug] [WD Proxy] "message" : "WebDriverAgent is ready to accept commands",
[debug] [WD Proxy] "state" : "success",
[debug] [WD Proxy] "os" : {
[debug] [WD Proxy] "name" : "iOS",
[debug] [WD Proxy] "version" : "13.5",
[debug] [WD Proxy] "sdkVersion" : "13.4"
[debug] [WD Proxy] },
[debug] [WD Proxy] "ios" : {
[debug] [WD Proxy] "simulatorVersion" : "13.5",
[debug] [WD Proxy] "ip" : "192.168.0.179"
[debug] [WD Proxy] },
[debug] [WD Proxy] "ready" : true,
[debug] [WD Proxy] "build" : {
[debug] [WD Proxy] "upgradedAt" : "1594729009140",
[debug] [WD Proxy] "time" : "Jul 14 2020 15:16:56",
[debug] [WD Proxy] "productBundleIdentifier" : "com.facebook.WebDriverAgentRunner"
[debug] [WD Proxy] }
[debug] [WD Proxy] },
[debug] [WD Proxy] "sessionId" : "3B71A8AC-48CE-4F87-B1D6-0ADEC643DD61"
[debug] [WD Proxy] }
[debug] [WebDriverAgent] Upgrade timestamp of the currently bundled WDA: 1594729009140
[debug] [WebDriverAgent] Upgrade timestamp of the WDA on the device: 1594729009140
[WebDriverAgent] Will reuse previously cached WDA instance at 'http://127.0.0.1:8100/' with 'com.facebook.WebDriverAgentRunner'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1594918843617 (20:00:43 GMT+0300 (Arabian Standard Time))
[WebDriverAgent] Using provided WebdriverAgent at 'http://127.0.0.1:8100/'
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] "value" : {
[debug] [WD Proxy] "message" : "WebDriverAgent is ready to accept commands",
[debug] [WD Proxy] "state" : "success",
[debug] [WD Proxy] "os" : {
[debug] [WD Proxy] "name" : "iOS",
[debug] [WD Proxy] "version" : "13.5",
[debug] [WD Proxy] "sdkVersion" : "13.4"
[debug] [WD Proxy] },
[debug] [WD Proxy] "ios" : {
[debug] [WD Proxy] "simulatorVersion" : "13.5",
[debug] [WD Proxy] "ip" : "192.168.0.179"
[debug] [WD Proxy] },
[debug] [WD Proxy] "ready" : true,
[debug] [WD Proxy] "build" : {
[debug] [WD Proxy] "upgradedAt" : "1594729009140",
[debug] [WD Proxy] "time" : "Jul 14 2020 15:16:56",
[debug] [WD Proxy] "productBundleIdentifier" : "com.facebook.WebDriverAgentRunner"
[debug] [WD Proxy] }
[debug] [WD Proxy] },
[debug] [WD Proxy] "sessionId" : "3B71A8AC-48CE-4F87-B1D6-0ADEC643DD61"
[debug] [WD Proxy] }
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1594918843623 (20:00:43 GMT+0300 (Arabian Standard Time))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"com.peer.udel","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}],"alwaysMatch":{}}}
[debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1","capabilities":{"device":"iphone","browserName":" ","sdkVersion":"13.5","CFBundleIdentifier":"com.apple.springboard"}},"sessionId":"F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1"}
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1594918851058 (20:00:51 GMT+0300 (Arabian Standard Time))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1594918851058 (20:00:51 GMT+0300 (Arabian Standard Time))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[debug] [BaseDriver] Event 'orientationSet' logged at 1594918851058 (20:00:51 GMT+0300 (Arabian Standard Time))
[debug] [BaseDriver] The value of 'elementResponseAttributes' setting did not change. Skipping the update for it
[debug] [BaseDriver] The value of 'shouldUseCompactResponses' setting did not change. Skipping the update for it
[Appium] New XCUITestDriver session created successfully, session a3b2ebb5-79ba-453f-b934-897cdb40d6df added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1594918851059 (20:00:51 GMT+0300 (Arabian Standard Time))
[debug] [W3C (a3b2ebb5)] Cached the protocol value 'W3C' for the new session a3b2ebb5-79ba-453f-b934-897cdb40d6df
[debug] [W3C (a3b2ebb5)] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":"true","networkConnectionEnabled":false,"platformName":"ios","app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","automationName":"XCuiTest","deviceName":"iPhone 11","locationServicesAuthorized":true,"platformVersion":"13.5","showXcodeLog":true,"udid":"FF517BC5-4460-49A6-9042-5A750B367BAC"}}
[HTTP] <-- POST /wd/hub/session 200 12750 ms - 552
[HTTP]
Jul 16, 2020 8:00:51 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: W3C
[HTTP] --> GET /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df
[HTTP] {}
[debug] [W3C (a3b2ebb5)] Calling AppiumDriver.getSession() with args: ["a3b2ebb5-79ba-453f-b934-897cdb40d6df"]
[debug] [XCUITest] Executing command 'getSession'
[debug] [WD Proxy] Matched '/' to command name 'getSession'
[debug] [WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8100/session/F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] "value" : {
[debug] [WD Proxy] "sessionId" : "F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1",
[debug] [WD Proxy] "capabilities" : {
[debug] [WD Proxy] "device" : "iphone",
[debug] [WD Proxy] "browserName" : " ",
[debug] [WD Proxy] "sdkVersion" : "13.5",
[debug] [WD Proxy] "CFBundleIdentifier" : "com.apple.springboard"
[debug] [WD Proxy] }
[debug] [WD Proxy] },
[debug] [WD Proxy] "sessionId" : "F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1"
[debug] [WD Proxy] }
[debug] [WD Proxy] Proxying [GET /wda/screen] to [GET http://127.0.0.1:8100/session/F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1/wda/screen] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] "value" : {
[debug] [WD Proxy] "statusBarSize" : {
[debug] [WD Proxy] "width" : 414,
[debug] [WD Proxy] "height" : 44
[debug] [WD Proxy] },
[debug] [WD Proxy] "scale" : 2
[debug] [WD Proxy] },
[debug] [WD Proxy] "sessionId" : "F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1"
[debug] [WD Proxy] }
[debug] [WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1/window/size] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] "value" : {
[debug] [WD Proxy] "width" : 414,
[debug] [WD Proxy] "height" : 896
[debug] [WD Proxy] },
[debug] [WD Proxy] "sessionId" : "F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1"
[debug] [WD Proxy] }
[XCUITest] Merging WDA caps over Appium caps for session detail response
[debug] [W3C (a3b2ebb5)] Responding to client with driver.getSession() result: {"udid":"FF517BC5-4460-49A6-9042-5A750B367BAC","platformName":"ios","takesScreenshot":"true","app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","automationName":"XCuiTest","deviceName":"iPhone 11","locationServicesAuthorized":true,"platformVersion":"13.5","showXcodeLog":true,"device":"iphone","browserName":" ","sdkVersion":"13.5","CFBundleIdentifier":"com.apple.springboard","pixelRatio":2,"statBarHeight":44,"viewportRect":{"left":0,"top":88,"width":828,"height":1704}}
[HTTP] <-- GET /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df 200 173 ms - 507
[HTTP]
[HTTP] --> GET /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df
[HTTP] {}
[debug] [W3C (a3b2ebb5)] Calling AppiumDriver.getSession() with args: ["a3b2ebb5-79ba-453f-b934-897cdb40d6df"]
[debug] [XCUITest] Executing command 'getSession'
[XCUITest] Merging WDA caps over Appium caps for session detail response
[debug] [W3C (a3b2ebb5)] Responding to client with driver.getSession() result: {"udid":"FF517BC5-4460-49A6-9042-5A750B367BAC","platformName":"ios","takesScreenshot":"true","app":"/Users/suaadbatis/Desktop/Mrsool_Mobile_Platform_iOS/app/MRSOOL.app","automationName":"XCuiTest","deviceName":"iPhone 11","locationServicesAuthorized":true,"platformVersion":"13.5","showXcodeLog":true,"device":"iphone","browserName":" ","sdkVersion":"13.5","CFBundleIdentifier":"com.apple.springboard","pixelRatio":2,"statBarHeight":44,"viewportRect":{"left":0,"top":88,"width":828,"height":1704}}
[HTTP] <-- GET /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df 200 1 ms - 507
[HTTP]
[HTTP] --> POST /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df/timeouts
[HTTP] {"implicit":10000}
[debug] [W3C (a3b2ebb5)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"a3b2ebb5-79ba-453f-b934-897cdb40d6df"]
[debug] [XCUITest] Executing command 'timeouts'
[debug] [BaseDriver] W3C timeout argument: {"implicit":10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (a3b2ebb5)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df/timeouts 200 2 ms - 14
[HTTP]
[HTTP] --> POST /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df/location
[HTTP] {"location":{"altitude":0,"latitude":24.581233418813877,"class":"org.openqa.selenium.html5.Location","longitude":46.77779648593186}}
[debug] [W3C (a3b2ebb5)] Calling AppiumDriver.setGeoLocation() with args: [{"altitude":0,"latitude":24.581233418813877,"class":"org.openqa.selenium.html5.Location","longitude":46.77779648593186},"a3b2ebb5-79ba-453f-b934-897cdb40d6df"]
[debug] [XCUITest] Executing command 'setGeoLocation'
[iOSSim] 'set-simulator-location' binary has not been found in your PATH. Please install it as "brew install lyft/formulae/set-simulator-location" by brew or read https://github.com/lyft/set-simulator-location to set the binary by manual to be able to set geolocation by the library.
[iOSSim] Failed to set geolocation with idb because it is not installed
[iOSSim] Cannot focus Simulator window with idb. Defaulting to AppleScript
[debug] [iOSSim] Executing UI Apple Script on Simulator with UDID FF517BC5-4460-49A6-9042-5A750B367BAC:
[debug] [iOSSim] tell application "System Events"
[debug] [iOSSim] tell process "Simulator"
[debug] [iOSSim] set frontmost to false
[debug] [iOSSim] set frontmost to true
[debug] [iOSSim] click (menu item 1 where (its name contains "iPhone 11 " and its name contains "13.5")) of menu 1 of menu bar item "Window" of menu bar 1
[debug] [iOSSim] end tell
[debug] [iOSSim] end tell
[debug] [iOSSim]
[debug] [iOSSim]
[debug] [iOSSim] tell application "System Events"
[debug] [iOSSim] tell process "Simulator"
[debug] [iOSSim] set featureName to "Custom Location"
[debug] [iOSSim] set dstMenuItem to menu item (featureName & "…") of menu 1 of menu item "Location" of menu 1 of menu bar item "Debug" of menu bar 1
[debug] [iOSSim] click dstMenuItem
[debug] [iOSSim] delay 1
[debug] [iOSSim] set value of text field 1 of window featureName to 24.581233418813877 as string
[debug] [iOSSim] delay 0.5
[debug] [iOSSim] set value of text field 2 of window featureName to 46.77779648593186 as string
[debug] [iOSSim] delay 0.5
[debug] [iOSSim] click button "OK" of window featureName
[debug] [iOSSim] delay 0.5
[debug] [iOSSim] set isInvisible to (not (exists (window featureName)))
[debug] [iOSSim] end tell
[debug] [iOSSim] end tell
[debug] [iOSSim]
[iOSSim] Could not complete operation. Make sure Simulator UI is running and the parent Appium application (e. g. Appium.app or Terminal.app) is present in System Preferences > Security & Privacy > Privacy > Accessibility list. If the operation is still unsuccessful then it is not supported by this Simulator. Original error: Command 'osascript -e '
[iOSSim] tell application "System Events"
[iOSSim] tell process "Simulator"
[iOSSim] set frontmost to false
[iOSSim] set frontmost to true
[iOSSim] click (menu item 1 where (its name contains "iPhone 11 " and its name contains "13.5")) of menu 1 of menu bar item "Window" of menu bar 1
[iOSSim] end tell
[iOSSim] end tell
[iOSSim]
[iOSSim]
[iOSSim] tell application "System Events"
[iOSSim] tell process "Simulator"
[iOSSim] set featureName to "Custom Location"
[iOSSim] set dstMenuItem to menu item (featureName & "…") of menu 1 of menu item "Location" of menu 1 of menu bar item "Debug" of menu bar 1
[iOSSim] click dstMenuItem
[iOSSim] delay 1
[iOSSim] set value of text field 1 of window featureName to 24.581233418813877 as string
[iOSSim] delay 0.5
[iOSSim] set value of text field 2 of window featureName to 46.77779648593186 as string
[iOSSim] delay 0.5
[iOSSim] click button "OK" of window featureName
[iOSSim] delay 0.5
[iOSSim] set isInvisible to (not (exists (window featureName)))
[iOSSim] end tell
[iOSSim] end tell
[iOSSim] '' exited with code 1
[iOSSim] Could not complete operation. Make sure Simulator UI is running and the parent Appium application (e. g. Appium.app or Terminal.app) is present in System Preferences > Security & Privacy > Privacy > Accessibility list. If the operation is still unsuccessful then it is not supported by this Simulator. Original error: Command 'osascript -e '
[iOSSim] tell application "System Events"
[iOSSim] tell process "Simulator"
[iOSSim] set frontmost to false
[iOSSim] set frontmost to true
[iOSSim] click (menu item 1 where (its name contains "iPhone 11 " and its name contains "13.5")) of menu 1 of menu bar item "Window" of menu bar 1
[iOSSim] end tell
[iOSSim] end tell
[iOSSim]
[iOSSim]
[iOSSim] tell application "System Events"
[iOSSim] tell process "Simulator"
[iOSSim] set featureName to "Custom Location"
[iOSSim] set dstMenuItem to menu item (featureName & "…") of menu 1 of menu item "Location" of menu 1 of menu bar item "Debug" of menu bar 1
[iOSSim] click dstMenuItem
[iOSSim] delay 1
[iOSSim] set value of text field 1 of window featureName to 24.581233418813877 as string
[iOSSim] delay 0.5
[iOSSim] set value of text field 2 of window featureName to 46.77779648593186 as string
[iOSSim] delay 0.5
[iOSSim] click button "OK" of window featureName
[iOSSim] delay 0.5
[iOSSim] set isInvisible to (not (exists (window featureName)))
[iOSSim] end tell
[iOSSim] end tell
[iOSSim] '' exited with code 1
[debug] [W3C (a3b2ebb5)] Encountered internal error running command: Error: Could not complete operation. Make sure Simulator UI is running and the parent Appium application (e. g. Appium.app or Terminal.app) is present in System Preferences > Security & Privacy > Privacy > Accessibility list. If the operation is still unsuccessful then it is not supported by this Simulator. Original error: Command 'osascript -e '
[debug] [W3C (a3b2ebb5)] tell application "System Events"
[debug] [W3C (a3b2ebb5)] tell process "Simulator"
[debug] [W3C (a3b2ebb5)] set frontmost to false
[debug] [W3C (a3b2ebb5)] set frontmost to true
[debug] [W3C (a3b2ebb5)] click (menu item 1 where (its name contains "iPhone 11 " and its name contains "13.5")) of menu 1 of menu bar item "Window" of menu bar 1
[debug] [W3C (a3b2ebb5)] end tell
[debug] [W3C (a3b2ebb5)] end tell
[debug] [W3C (a3b2ebb5)]
[debug] [W3C (a3b2ebb5)]
[debug] [W3C (a3b2ebb5)] tell application "System Events"
[debug] [W3C (a3b2ebb5)] tell process "Simulator"
[debug] [W3C (a3b2ebb5)] set featureName to "Custom Location"
[debug] [W3C (a3b2ebb5)] set dstMenuItem to menu item (featureName & "…") of menu 1 of menu item "Location" of menu 1 of menu bar item "Debug" of menu bar 1
[debug] [W3C (a3b2ebb5)] click dstMenuItem
[debug] [W3C (a3b2ebb5)] delay 1
[debug] [W3C (a3b2ebb5)] set value of text field 1 of window featureName to 24.581233418813877 as string
[debug] [W3C (a3b2ebb5)] delay 0.5
[debug] [W3C (a3b2ebb5)] set value of text field 2 of window featureName to 46.77779648593186 as string
[debug] [W3C (a3b2ebb5)] delay 0.5
[debug] [W3C (a3b2ebb5)] click button "OK" of window featureName
[debug] [W3C (a3b2ebb5)] delay 0.5
[debug] [W3C (a3b2ebb5)] set isInvisible to (not (exists (window featureName)))
[debug] [W3C (a3b2ebb5)] end tell
[debug] [W3C (a3b2ebb5)] end tell
[debug] [W3C (a3b2ebb5)] '' exited with code 1
[debug] [W3C (a3b2ebb5)] at Object.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:87:35)
[debug] [W3C (a3b2ebb5)] at /usr/local/lib/node_modules/appium/node_modules/appium-ios-simulator/lib/simulator-xcode-6.js:1063:13
[HTTP] <-- POST /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df/location 500 590 ms - 3301
[HTTP]

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not complete operation. Make sure Simulator UI is running and the parent Appium application (e. g. Appium.app or Terminal.app) is present in System Preferences > Security & Privacy > Privacy > Accessibility list. If the operation is still unsuccessful then it is not supported by this Simulator. Original error: Command 'osascript -e '
tell application "System Events"
tell process "Simulator"
set frontmost to false
set frontmost to true
click (menu item 1 where (its name contains "iPhone 11 " and its name contains "13.5")) of menu 1 of menu bar item "Window" of menu bar 1
end tell
end tell

tell application "System Events"
  tell process "Simulator"
    set featureName to "Custom Location"
    set dstMenuItem to menu item (featureName & "…") of menu 1 of menu item "Location" of menu 1 of menu bar item "Debug" of menu bar 1
    click dstMenuItem
    delay 1
    set value of text field 1 of window featureName to 24.581233418813877 as string
    delay 0.5
    set value of text field 2 of window featureName to 46.77779648593186 as string
    delay 0.5
    click button "OK" of window featureName
    delay 0.5
    set isInvisible to (not (exists (window featureName)))
  end tell
end tell

'' exited with code 1
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'MacBook-Pro.local', ip: 'fe80:0:0:0:8b0:57d7:f437:cec0%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '11.0.6'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {app: /Users/suaadbatis/Desktop/M..., automationName: XCuiTest, browserName: , databaseEnabled: false, deviceName: iPhone 11, javascriptEnabled: true, locationContextEnabled: false, locationServicesAuthorized: true, networkConnectionEnabled: false, platform: MAC, platformName: iOS, platformVersion: 13.5, showXcodeLog: true, takesScreenshot: true, udid: FF517BC5-4460-49A6-9042-5A7..., webStorageEnabled: false}
Session ID: a3b2ebb5-79ba-453f-b934-897cdb40d6df

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:490)
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:231)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
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 io.appium.java_client.AppiumExecutionMethod.execute(AppiumExecutionMethod.java:46)
at org.openqa.selenium.remote.html5.RemoteLocationContext.setLocation(RemoteLocationContext.java:50)
at io.appium.java_client.AppiumDriver.setLocation(AppiumDriver.java:263)
at Mrsool.platform.ios.BaseClasses.BaseClass.Capabilities(BaseClass.java:105)
at Mrsool.platform.ios.BaseClasses.LoginScreen.LoginScreenAR(LoginScreen.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:702)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:894)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1219)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:768)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1188)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1113)
at org.testng.TestNG.run(TestNG.java:1025)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:110)

[HTTP] --> DELETE /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df
[HTTP] {}
[debug] [W3C (a3b2ebb5)] Calling AppiumDriver.deleteSession() with args: ["a3b2ebb5-79ba-453f-b934-897cdb40d6df"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1594918851920 (20:00:51 GMT+0300 (Arabian Standard Time))
[Appium] Removing session a3b2ebb5-79ba-453f-b934-897cdb40d6df from our master session list
[debug] [WD Proxy] Matched '/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df' to command name 'deleteSession'
[debug] [WD Proxy] Proxying [DELETE /session/a3b2ebb5-79ba-453f-b934-897cdb40d6df] to [DELETE http://127.0.0.1:8100/session/F66D1370-2EC8-40D3-B8EC-B5E8CE0EF0A1] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] "value" : null,
[debug] [WD Proxy] "sessionId" : "EC7E76C6-959B-4429-9712-1266BC3AC0B2"
[debug] [WD Proxy] }
[DevCon Factory] Releasing connections for FF517BC5-4460-49A6-9042-5A750B367BAC device on any port number
[DevCon Factory] Found cached connections to release: ["FF517BC5-4460-49A6-9042-5A750B367BAC:8100"]
[debug] [DevCon Factory] Cached connections count: 0
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [IOSSimulatorLog] Stopping iOS log capture
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1594918852964 (20:00:52 GMT+0300 (Arabian Standard Time))
[debug] [W3C (a3b2ebb5)] Received response: null
[debug] [W3C (a3b2ebb5)] But deleting session, so not returning
[debug] [W3C (a3b2ebb5)] Responding to client with driver.deleteSession() result: null
[debug] [W3C (a3b2ebb5)] Destroying socket connection
[HTTP] <-- DELETE /wd/hub/session/a3b2ebb5-79ba-453f-b934-897cdb40d6df 200 1045 ms - 14
[HTTP]

java.lang.NullPointerException
at Mrsool.platform.ios.BaseClasses.BaseClass.treadDown(BaseClass.java:148)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:551)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:225)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:768)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1188)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1113)
at org.testng.TestNG.run(TestNG.java:1025)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:110)

===============================================
Default Suite
Total tests run: 1, Failures: 1, Skips: 0

Configuration Failures: 1, Skips: 0

Process finished with exit code 0

_.

  • I am on (pick one):

    • [√ ] Mac

    • [ ] Windows

    • [ ] Linux

Most helpful comment

All possible solution to set location did not work.

Appium takes care of them with set-simulator-location, idb and AppleScript.

You did not have the first two items. (appium-doctor addresses them. They may help.)

[iOSSim] 'set-simulator-location' binary has not been found in your PATH. Please install it as "brew install lyft/formulae/set-simulator-location" by brew or read https://github.com/lyft/set-simulator-location to set the binary by manual to be able to set geolocation by the library.
[iOSSim] Failed to set geolocation with idb because it is not installed

AppleScript strongly depends on UI. Probably your Xcode environment had different UI. Needed to fix them.

All 2 comments

All possible solution to set location did not work.

Appium takes care of them with set-simulator-location, idb and AppleScript.

You did not have the first two items. (appium-doctor addresses them. They may help.)

[iOSSim] 'set-simulator-location' binary has not been found in your PATH. Please install it as "brew install lyft/formulae/set-simulator-location" by brew or read https://github.com/lyft/set-simulator-location to set the binary by manual to be able to set geolocation by the library.
[iOSSim] Failed to set geolocation with idb because it is not installed

AppleScript strongly depends on UI. Probably your Xcode environment had different UI. Needed to fix them.

@KazuCocoa alright, my issue has solved, thanks you saved my time
1- install > set-simulator-location
2- run this command line >
set-simulator-location -c 24.583852 46.784436 -s iPhone 11pro -u 76122999-B891-48E2-840C-16DAEB0B1B48

_this is the rule:_
Usage: set-simulator-location [-c 0 0|-q San Francisco] [-s Simulator Name|-u Simulator udid]

Was this page helpful?
0 / 5 - 0 ratings