appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
125 stars 24 forks source link

Is it possible to disable moving cursor to top-left corner before any action executed? #189

Closed hellozyemlya closed 1 year ago

hellozyemlya commented 1 year ago

Issue name is self descriptive.

mykola-mokhnach commented 1 year ago

how do you execute actions? it would be useful to have some code examples and server logs attached

hellozyemlya commented 1 year ago

Hm. Actually, maybe I have old mac driver? The one installed with appium is "version": "0.14.1"

hellozyemlya commented 1 year ago

@mykola-mokhnach It worth to say that I am trying to test Avalonia application. Everything works fine on windows platform, but on mac os it fails in most cases. When I run client.actions, cursor position resets to top left corner of screen.

Also, most actions will fail, since missing "releaseActions". Is it mac driver problem, or Avalonia app problem?

const wdio = require("webdriverio");

const opts = {
    port: 4723,
    capabilities: {
        platformName: "Mac",
        "appium:automationName": "mac2",
        "appium:bundleId": "com.my.app"
    }
};

const sleep = ms => new Promise(r => setTimeout(r, ms));
async function main () {
    const client = await wdio.remote(opts);

    try {
        // Find and click element by accessibility id
        await (await client.$('~FileMenu')).click()
        await (await client.$('~NewObjectMenu')).click()

        await sleep(1000)

        const obj = await client.$("~Object");
        const scene = await client.$("~Scene");

        const sourceLocation = await obj.getLocation();
        const targetLocation = await scene.getLocation();

        await client.actions([
            client.action('pointer')
                .move(sourceLocation.x, sourceLocation.y)
                .down()
                .move(targetLocation.x+100, targetLocation.y+100)
                .up()
            ])

        await sleep(1000)
    } catch (err) {
        console.error('Error:', err);
    } finally {
        await client.deleteSession();
    }
}

main();

server logs(just installed appium@next):

[Appium] [Appium] Welcome to Appium v2.0.0-beta.55 (REV 6ad92949e910041416d84a53966ec46b873e069f)
[Appium] [Appium] Non-default server args:
[Appium] [Appium] { logNoColors: true }
[Appium] [Appium] Attempting to load driver mac2...
[debug] [Appium] [Appium] Requiring driver at /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver
[Appium] [Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] [Appium] Available drivers:
[Appium] [Appium]   - mac2@1.5.1 (automationName 'Mac2')
[Appium] [Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] [HTTP] --> POST /session
[HTTP] [HTTP] {"capabilities":{"alwaysMatch":{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app.PlayComposer"},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app.PlayComposer"}}
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Calling AppiumDriver.createSession() with args: [{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app.PlayComposer"},null,{"alwaysMatch":{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app.PlayComposer"},"firstMatch":[{}]}]
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Event 'newSessionRequested' logged at 1676912667803 (19:04:27 GMT+0200 (Eastern European Standard Time))
[Appium] [Appium] Attempting to find matching driver for automationName 'mac2' and platformName 'Mac'
[Appium] [Appium] The 'mac2' driver was installed and matched caps.
[Appium] [Appium] Will require it at /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver
[debug] [Appium] [Appium] Requiring driver at /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver
[AppiumDriver@a678] [AppiumDriver@a678] Appium v2.0.0-beta.55 creating new Mac2Driver (v1.5.1) session
[AppiumDriver@a678] [AppiumDriver@a678] Checking BaseDriver versions for Appium and Mac2Driver
[AppiumDriver@a678] [AppiumDriver@a678] Appium's BaseDriver version is 9.3.1
[AppiumDriver@a678] [AppiumDriver@a678] Mac2Driver's BaseDriver version is 9.3.1
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0] Creating session with W3C capabilities: {
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]   "alwaysMatch": {
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]     "platformName": "Mac",
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]     "appium:automationName": "mac2",
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]     "appium:bundleId": "com.my.app.PlayComposer"
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]   },
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]   "firstMatch": [
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]     {}
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0]   ]
[debug] [Mac2Driver@9fd0] [Mac2Driver@9fd0] }
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Session created with session id: 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using bootstrap root: /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver/WebDriverAgentMac
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using xcodebuild binary at '/usr/bin/xcodebuild'
[WebDriverAgentMac] [WebDriverAgentMac] WebDriverAgent sources are up to date (1676911257171 >= 1676911257171)
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using 127.0.0.1 as server host
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using port 10100
[WebDriverAgentMac] [WebDriverAgentMac] Mac2Driver host process logging is disabled. All the xcodebuild output is going to be suppressed. Set the 'showServerLogs' capability to 'true' if this is an undesired behavior
[WebDriverAgentMac] [WebDriverAgentMac] Starting Mac2Driver host process: xcodebuild build-for-testing test-without-building -project /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner COMPILER_INDEX_STORE_ENABLE\=NO
[debug] [WD Proxy] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:10100/status] with no body
[WD Proxy] [WD Proxy] connect ECONNREFUSED 127.0.0.1:10100
[debug] [WD Proxy] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:10100/status] with no body
[WD Proxy] [WD Proxy] connect ECONNREFUSED 127.0.0.1:10100
[debug] [WD Proxy] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:10100/status] with no body
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"version":"Version 12.6.1 (Build 21G217)"},"ready":true,"build":{"time":"Feb 20 2023 18:50:24"}},"sessionId":null}
[WebDriverAgentMac] [WebDriverAgentMac] The host process is ready within 2086ms
[debug] [WD Proxy] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:10100/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Mac","automationName":"mac2","bundleId":"com.my.app.PlayComposer"}}}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39","capabilities":{"CFBundleIdentifier":"com.my.app.PlayComposer"}},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[WD Proxy] [WD Proxy] Determined the downstream protocol as 'W3C'
[AppiumDriver@a678] [AppiumDriver@a678] New Mac2Driver session created successfully, session 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7 added to master session list
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Event 'newSessionStarted' logged at 1676912671734 (19:04:31 GMT+0200 (Eastern European Standard Time))
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Cached the protocol value 'W3C' for the new session 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"Mac","automationName":"mac2","bundleId":"com.my.app.PlayComposer"}}
[HTTP] [HTTP] <-- POST /session 200 3937 ms - 159
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element
[HTTP] [HTTP] {"using":"accessibility id","value":"FileMenu"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Calling AppiumDriver.findElement() with args: ["accessibility id","FileMenu","83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7"]
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element] with body: {"using":"accessibility id","value":"FileMenu"}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"F7F440C3-EB2B-4D70-8654-D81F4A34457A","element-6066-11e4-a52e-4f735466cecf":"F7F440C3-EB2B-4D70-8654-D81F4A34457A"},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"F7F440C3-EB2B-4D70-8654-D81F4A34457A","ELEMENT":"F7F440C3-EB2B-4D70-8654-D81F4A34457A"}
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element 200 161 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/F7F440C3-EB2B-4D70-8654-D81F4A34457A/click
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/F7F440C3-EB2B-4D70-8654-D81F4A34457A/click' to command name 'click'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/F7F440C3-EB2B-4D70-8654-D81F4A34457A/click] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element/F7F440C3-EB2B-4D70-8654-D81F4A34457A/click] with body: {}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[WD Proxy] [WD Proxy] Replacing sessionId 8D94D13B-2A92-44C8-8066-348F2A56FE39 with 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/F7F440C3-EB2B-4D70-8654-D81F4A34457A/click 200 548 ms - 65
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element
[HTTP] [HTTP] {"using":"accessibility id","value":"NewObjectMenu"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Calling AppiumDriver.findElement() with args: ["accessibility id","NewObjectMenu","83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7"]
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element] with body: {"using":"accessibility id","value":"NewObjectMenu"}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"9175BD02-7215-47C0-85BB-02A51AB49E0A","element-6066-11e4-a52e-4f735466cecf":"9175BD02-7215-47C0-85BB-02A51AB49E0A"},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"9175BD02-7215-47C0-85BB-02A51AB49E0A","ELEMENT":"9175BD02-7215-47C0-85BB-02A51AB49E0A"}
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element 200 105 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/9175BD02-7215-47C0-85BB-02A51AB49E0A/click
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/9175BD02-7215-47C0-85BB-02A51AB49E0A/click' to command name 'click'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/9175BD02-7215-47C0-85BB-02A51AB49E0A/click] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element/9175BD02-7215-47C0-85BB-02A51AB49E0A/click] with body: {}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[WD Proxy] [WD Proxy] Replacing sessionId 8D94D13B-2A92-44C8-8066-348F2A56FE39 with 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/9175BD02-7215-47C0-85BB-02A51AB49E0A/click 200 555 ms - 65
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element
[HTTP] [HTTP] {"using":"accessibility id","value":"Object"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Calling AppiumDriver.findElement() with args: ["accessibility id","Object","83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7"]
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element] with body: {"using":"accessibility id","value":"Object"}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"79B9C155-8ADD-473C-B967-A7270AC9F37A","element-6066-11e4-a52e-4f735466cecf":"79B9C155-8ADD-473C-B967-A7270AC9F37A"},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"79B9C155-8ADD-473C-B967-A7270AC9F37A","ELEMENT":"79B9C155-8ADD-473C-B967-A7270AC9F37A"}
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element 200 140 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element
[HTTP] [HTTP] {"using":"accessibility id","value":"Scene"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Calling AppiumDriver.findElement() with args: ["accessibility id","Scene","83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7"]
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element] with body: {"using":"accessibility id","value":"Scene"}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"DAA99FB3-1031-498A-84CC-02AED9E70605","element-6066-11e4-a52e-4f735466cecf":"DAA99FB3-1031-498A-84CC-02AED9E70605"},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"DAA99FB3-1031-498A-84CC-02AED9E70605","ELEMENT":"DAA99FB3-1031-498A-84CC-02AED9E70605"}
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element 200 100 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> GET /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/79B9C155-8ADD-473C-B967-A7270AC9F37A/rect
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/79B9C155-8ADD-473C-B967-A7270AC9F37A/rect' to command name 'getElementRect'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/79B9C155-8ADD-473C-B967-A7270AC9F37A/rect] to [GET http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element/79B9C155-8ADD-473C-B967-A7270AC9F37A/rect] with no body
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"y":224,"x":32,"width":311,"height":42},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[WD Proxy] [WD Proxy] Replacing sessionId 8D94D13B-2A92-44C8-8066-348F2A56FE39 with 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[HTTP] [HTTP] <-- GET /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/79B9C155-8ADD-473C-B967-A7270AC9F37A/rect 200 103 ms - 101
[HTTP] [HTTP] 
[HTTP] [HTTP] --> GET /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/DAA99FB3-1031-498A-84CC-02AED9E70605/rect
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/DAA99FB3-1031-498A-84CC-02AED9E70605/rect' to command name 'getElementRect'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/DAA99FB3-1031-498A-84CC-02AED9E70605/rect] to [GET http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/element/DAA99FB3-1031-498A-84CC-02AED9E70605/rect] with no body
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"y":185,"x":357,"width":883,"height":704},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[WD Proxy] [WD Proxy] Replacing sessionId 8D94D13B-2A92-44C8-8066-348F2A56FE39 with 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[HTTP] [HTTP] <-- GET /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/element/DAA99FB3-1031-498A-84CC-02AED9E70605/rect 200 97 ms - 103
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions
[HTTP] [HTTP] {"actions":[{"id":"action1","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":32,"y":224,"duration":100,"origin":"viewport"},{"type":"pointerDown","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0},{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":457,"y":285,"duration":100,"origin":"viewport"},{"type":"pointerUp","button":0}]}]}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions' to command name 'performActions'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions] to [POST http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions] with body: {"actions":[{"id":"action1","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":32,"y":224,"duration":100,"origin":"viewport"},{"type":"pointerDown","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0},{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":457,"y":285,"duration":100,"origin":"viewport"},{"type":"pointerUp","button":0}]}]}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[WD Proxy] [WD Proxy] Replacing sessionId 8D94D13B-2A92-44C8-8066-348F2A56FE39 with 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[HTTP] [HTTP] <-- POST /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions 200 225 ms - 65
[HTTP] [HTTP] 
[HTTP] [HTTP] --> DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions' to command name 'releaseActions'
[debug] [WD Proxy] [WD Proxy] Proxying [DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions] to [DELETE http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions] with no body
[WD Proxy] [WD Proxy] Got response with status 404: {"value":{"error":"unknown command","message":"Unhandled endpoint: /session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions -- http://127.0.0.1:10100/ with parameters {\n    wildcards =     (\n        \"session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions\"\n    );\n}","traceback":""},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [W3C] [W3C] Matched W3C error code 'unknown command' to UnknownCommandError
[HTTP] [HTTP] <-- DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions 404 23 ms - 1013
[HTTP] [HTTP] 
[HTTP] [HTTP] --> DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions' to command name 'releaseActions'
[debug] [WD Proxy] [WD Proxy] Proxying [DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions] to [DELETE http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions] with no body
[WD Proxy] [WD Proxy] Got response with status 404: {"value":{"error":"unknown command","message":"Unhandled endpoint: /session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions -- http://127.0.0.1:10100/ with parameters {\n    wildcards =     (\n        \"session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions\"\n    );\n}","traceback":""},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [W3C] [W3C] Matched W3C error code 'unknown command' to UnknownCommandError
[HTTP] [HTTP] <-- DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions 404 4 ms - 1013
[HTTP] [HTTP] 
[HTTP] [HTTP] --> DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions' to command name 'releaseActions'
[debug] [WD Proxy] [WD Proxy] Proxying [DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions] to [DELETE http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions] with no body
[WD Proxy] [WD Proxy] Got response with status 404: {"value":{"error":"unknown command","message":"Unhandled endpoint: /session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions -- http://127.0.0.1:10100/ with parameters {\n    wildcards =     (\n        \"session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions\"\n    );\n}","traceback":""},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [W3C] [W3C] Matched W3C error code 'unknown command' to UnknownCommandError
[HTTP] [HTTP] <-- DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions 404 3 ms - 1013
[HTTP] [HTTP] 
[HTTP] [HTTP] --> DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions
[HTTP] [HTTP] {}
[Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions' to command name 'releaseActions'
[debug] [WD Proxy] [WD Proxy] Proxying [DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions] to [DELETE http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions] with no body
[WD Proxy] [WD Proxy] Got response with status 404: {"value":{"error":"unknown command","message":"Unhandled endpoint: /session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions -- http://127.0.0.1:10100/ with parameters {\n    wildcards =     (\n        \"session/8D94D13B-2A92-44C8-8066-348F2A56FE39/actions\"\n    );\n}","traceback":""},"sessionId":"8D94D13B-2A92-44C8-8066-348F2A56FE39"}
[debug] [W3C] [W3C] Matched W3C error code 'unknown command' to UnknownCommandError
[HTTP] [HTTP] <-- DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7/actions 404 3 ms - 1013
[HTTP] [HTTP] 
[HTTP] [HTTP] --> DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7
[HTTP] [HTTP] {}
[debug] [Mac2Driver@9fd0 (83ebf9c5)] [Mac2Driver@9fd0 (83ebf9c5)] Calling AppiumDriver.deleteSession() with args: ["83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7"]
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Event 'quitSessionRequested' logged at 1676912674901 (19:04:34 GMT+0200 (Eastern European Standard Time))
[AppiumDriver@a678] [AppiumDriver@a678] Removing session 83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7 from our master session list
[debug] [WD Proxy] [WD Proxy] Matched '/session/8D94D13B-2A92-44C8-8066-348F2A56FE39' to command name 'deleteSession'
[debug] [WD Proxy] [WD Proxy] Proxying [DELETE /session/8D94D13B-2A92-44C8-8066-348F2A56FE39] to [DELETE http://127.0.0.1:10100/session/8D94D13B-2A92-44C8-8066-348F2A56FE39] with no body
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":null}
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Event 'quitSessionFinished' logged at 1676912675969 (19:04:35 GMT+0200 (Eastern European Standard Time))
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Received response: null
[debug] [AppiumDriver@a678] [AppiumDriver@a678] But deleting session, so not returning
[debug] [AppiumDriver@a678] [AppiumDriver@a678] Responding to client with driver.deleteSession() result: null
[HTTP] [HTTP] <-- DELETE /session/83ebf9c5-fa4b-4c33-a867-910b1d1ca6c7 200 1069 ms - 14
[HTTP] [HTTP] 
[Appium] [Appium] Received SIGINT - shutting down
[debug] [AppiumDriver@a678] [AppiumDriver@a678] There are no active sessions for cleanup
[HTTP] [HTTP] Waiting until the server is closed
[HTTP] [HTTP] Received server close event
mykola-mokhnach commented 1 year ago

[HTTP] [HTTP] {"actions":[{"id":"action1","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":32,"y":224,"duration":100,"origin":"viewport"},{"type":"pointerDown","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0},{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":457,"y":285,"duration":100,"origin":"viewport"},{"type":"pointerUp","button":0}]}]}

According to this actions chain the initial cursor position should be at (32, 224). Isn't this the case?

Not sure why the client sends releaseActions command afterwards though. Perhaps, it's some implicit logic there... I think we could just add a dummy implementation for it in the mac2 driver to avoid throwing of the UnknownCommandError.

mykola-mokhnach commented 1 year ago

You could also try https://github.com/appium/appium-mac2-driver#macos-clickanddrag extension as a possible workaround

hellozyemlya commented 1 year ago

So, yes, first coordinates is 32, 224, but that is not a 0, 0. It moves cursor to 0, 0 every time before moving to 32, 244.

mykola-mokhnach commented 1 year ago

Try to enable showServerLogs option - maybe it would show more useful into about what XCTest is doing there. I don't see any suspicious places in the code where it could reset the cursor position

mykola-mokhnach commented 1 year ago

It's quite tricky, because XCTest does not document low-level cursor control APIs. Try to apply the patch from https://github.com/appium/appium-mac2-driver/pull/192 locally and see if that helps

hellozyemlya commented 1 year ago

It also interesting, even if app located on second monitor, it still resets cursor position to my primary top-left corner of my primary monitor :)

Here is slightly updated example:

const wdio = require("webdriverio");

const opts = {
    port: 4723,
    capabilities: {
        platformName: "Mac",
        "appium:automationName": "mac2",
        "appium:bundleId": "...",
        "appium:showServerLogs": true
    },
};

const sleep = ms => new Promise(r => setTimeout(r, ms));
async function main () {
    const client = await wdio.remote(opts);

    try {
        // Find and click element by accessibility id
        await (await client.$('~FileMenu')).click()
        await (await client.$('~NewObjectMenu')).click()

        await sleep(1000)

        const mechanic = await client.$("~...");
        const scene = await client.$("~Scene");

        const sourceLocation = await mechanic.getLocation();
        const targetLocation = await scene.getLocation();

        await client.performActions([client.action('pointer', {parameters: {pointerType:"mouse"}})
                .move(sourceLocation.x + 10, sourceLocation.y + 10)
                .down()
                .move(targetLocation.x + 10, targetLocation.y + 10)
                .up().toJSON()])

//        await client.actions([
//            client.action('pointer')
//                .move(sourceLocation.x, sourceLocation.y)
//                .down()
//                .move(targetLocation.x+100, targetLocation.y+100)
//                .up()
//            ])

        await sleep(1000)
    } catch (err) {
        console.error('Error:', err);
    } finally {
        await client.deleteSession();
    }
}

main();

client log:

2023-02-20T17:42:49.746Z INFO webdriver: Initiate new session using the WebDriver protocol
2023-02-20T17:42:49.783Z INFO webdriver: [POST] http://127.0.0.1:4723/session
2023-02-20T17:42:49.783Z INFO webdriver: DATA {
  capabilities: {
    alwaysMatch: {
      platformName: 'Mac',
      'appium:automationName': 'mac2',
      'appium:bundleId': 'com.my.app',
      'appium:showServerLogs': true
    },
    firstMatch: [ {} ]
  },
  desiredCapabilities: {
    platformName: 'Mac',
    'appium:automationName': 'mac2',
    'appium:bundleId': 'com.my.app',
    'appium:showServerLogs': true
  }
}
2023-02-20T17:42:53.677Z INFO webdriver: COMMAND findElement("accessibility id", "FileMenu")
2023-02-20T17:42:53.678Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
2023-02-20T17:42:53.678Z INFO webdriver: DATA { using: 'accessibility id', value: 'FileMenu' }
2023-02-20T17:42:53.840Z INFO webdriver: RESULT {
  'element-6066-11e4-a52e-4f735466cecf': 'FBDD38E6-4C19-4A15-8550-E200F4092712',
  ELEMENT: 'FBDD38E6-4C19-4A15-8550-E200F4092712'
}
2023-02-20T17:42:53.844Z INFO webdriver: COMMAND elementClick("FBDD38E6-4C19-4A15-8550-E200F4092712")
2023-02-20T17:42:53.844Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/FBDD38E6-4C19-4A15-8550-E200F4092712/click
2023-02-20T17:42:54.392Z INFO webdriver: RESULT null
2023-02-20T17:42:54.393Z INFO webdriver: COMMAND findElement("accessibility id", "NewObjectMenu")
2023-02-20T17:42:54.393Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
2023-02-20T17:42:54.393Z INFO webdriver: DATA { using: 'accessibility id', value: 'NewObjectMenu' }
2023-02-20T17:42:54.501Z INFO webdriver: RESULT {
  'element-6066-11e4-a52e-4f735466cecf': '60AE237F-A544-45CC-93FD-8CCDB75797DA',
  ELEMENT: '60AE237F-A544-45CC-93FD-8CCDB75797DA'
}
2023-02-20T17:42:54.508Z INFO webdriver: COMMAND elementClick("60AE237F-A544-45CC-93FD-8CCDB75797DA")
2023-02-20T17:42:54.509Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/60AE237F-A544-45CC-93FD-8CCDB75797DA/click
2023-02-20T17:42:55.076Z INFO webdriver: RESULT null
2023-02-20T17:42:56.080Z INFO webdriver: COMMAND findElement("accessibility id", "object")
2023-02-20T17:42:56.081Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
2023-02-20T17:42:56.081Z INFO webdriver: DATA { using: 'accessibility id', value: 'object' }
2023-02-20T17:42:56.235Z INFO webdriver: RESULT {
  'element-6066-11e4-a52e-4f735466cecf': '3FD05051-AB43-42EA-A384-C573282A04BC',
  ELEMENT: '3FD05051-AB43-42EA-A384-C573282A04BC'
}
2023-02-20T17:42:56.239Z INFO webdriver: COMMAND findElement("accessibility id", "Scene")
2023-02-20T17:42:56.239Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
2023-02-20T17:42:56.239Z INFO webdriver: DATA { using: 'accessibility id', value: 'Scene' }
2023-02-20T17:42:56.350Z INFO webdriver: RESULT {
  'element-6066-11e4-a52e-4f735466cecf': '1EE367A3-AD14-48F8-8D5A-4E43B2C946B0',
  ELEMENT: '1EE367A3-AD14-48F8-8D5A-4E43B2C946B0'
}
2023-02-20T17:42:56.354Z INFO webdriver: COMMAND getElementRect("3FD05051-AB43-42EA-A384-C573282A04BC")
2023-02-20T17:42:56.354Z INFO webdriver: [GET] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/3FD05051-AB43-42EA-A384-C573282A04BC/rect
2023-02-20T17:42:56.468Z INFO webdriver: RESULT { y: 224, x: 32, width: 311, height: 42 }
2023-02-20T17:42:56.469Z INFO webdriver: COMMAND getElementRect("1EE367A3-AD14-48F8-8D5A-4E43B2C946B0")
2023-02-20T17:42:56.469Z INFO webdriver: [GET] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/1EE367A3-AD14-48F8-8D5A-4E43B2C946B0/rect
2023-02-20T17:42:56.585Z INFO webdriver: RESULT { y: 185, x: 357, width: 883, height: 704 }
2023-02-20T17:42:56.587Z INFO webdriver: COMMAND performActions(<object>)
2023-02-20T17:42:56.588Z INFO webdriver: [POST] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/actions
2023-02-20T17:42:56.588Z INFO webdriver: DATA {
  actions: [
    {
      id: 'action1',
      type: 'pointer',
      parameters: [Object],
      actions: [Array]
    }
  ]
}
2023-02-20T17:42:56.806Z INFO webdriver: RESULT null
2023-02-20T17:42:57.807Z INFO webdriver: COMMAND deleteSession()
2023-02-20T17:42:57.808Z INFO webdriver: [DELETE] http://127.0.0.1:4723/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
2023-02-20T17:42:58.903Z INFO webdriver: RESULT null

server log:

[Appium] [Appium] Welcome to Appium v2.0.0-beta.55 (REV 6ad92949e910041416d84a53966ec46b873e069f)
[Appium] [Appium] Non-default server args:
[Appium] [Appium] { logNoColors: true }
[Appium] [Appium] Attempting to load driver mac2...
[debug] [Appium] [Appium] Requiring driver at /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver
[Appium] [Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] [Appium] Available drivers:
[Appium] [Appium]   - mac2@1.5.1 (automationName 'Mac2')
[Appium] [Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] [HTTP] --> POST /session
[HTTP] [HTTP] {"capabilities":{"alwaysMatch":{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app","appium:showServerLogs":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app","appium:showServerLogs":true}}
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Calling AppiumDriver.createSession() with args: [{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app","appium:showServerLogs":true},null,{"alwaysMatch":{"platformName":"Mac","appium:automationName":"mac2","appium:bundleId":"com.my.app","appium:showServerLogs":true},"firstMatch":[{}]}]
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Event 'newSessionRequested' logged at 1676914969798 (19:42:49 GMT+0200 (Eastern European Standard Time))
[Appium] [Appium] Attempting to find matching driver for automationName 'mac2' and platformName 'Mac'
[Appium] [Appium] The 'mac2' driver was installed and matched caps.
[Appium] [Appium] Will require it at /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver
[debug] [Appium] [Appium] Requiring driver at /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver
[AppiumDriver@f22b] [AppiumDriver@f22b] Appium v2.0.0-beta.55 creating new Mac2Driver (v1.5.1) session
[AppiumDriver@f22b] [AppiumDriver@f22b] Checking BaseDriver versions for Appium and Mac2Driver
[AppiumDriver@f22b] [AppiumDriver@f22b] Appium's BaseDriver version is 9.3.1
[AppiumDriver@f22b] [AppiumDriver@f22b] Mac2Driver's BaseDriver version is 9.3.1
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8] Creating session with W3C capabilities: {
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]   "alwaysMatch": {
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]     "platformName": "Mac",
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]     "appium:automationName": "mac2",
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]     "appium:bundleId": "com.my.app",
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]     "appium:showServerLogs": true
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]   },
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]   "firstMatch": [
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]     {}
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8]   ]
[debug] [Mac2Driver@fff8] [Mac2Driver@fff8] }
[Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Session created with session id: 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using bootstrap root: /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver/WebDriverAgentMac
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using xcodebuild binary at '/usr/bin/xcodebuild'
[WebDriverAgentMac] [WebDriverAgentMac] WebDriverAgent sources are up to date (1676911257171 >= 1676911257171)
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using 127.0.0.1 as server host
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Using port 10100
[WebDriverAgentMac] [WebDriverAgentMac] Starting Mac2Driver host process: xcodebuild build-for-testing test-without-building -project /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner COMPILER_INDEX_STORE_ENABLE\=NO
[debug] [WD Proxy] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:10100/status] with no body
[WD Proxy] [WD Proxy] connect ECONNREFUSED 127.0.0.1:10100
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Command line invocation:
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build-for-testing test-without-building -project /Users/eugenechekanskiy/.appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner COMPILER_INDEX_STORE_ENABLE=NO
[debug] [WebDriverAgentMac] [WebDriverAgentMac] 
[debug] [WebDriverAgentMac] [WebDriverAgentMac] User defaults from command line:
[debug] [WebDriverAgentMac] [WebDriverAgentMac]     IDEPackageSupportUseBuiltinSCM = YES
[debug] [WebDriverAgentMac] [WebDriverAgentMac] 
[debug] [WebDriverAgentMac] [WebDriverAgentMac] Build settings from command line:
[debug] [WebDriverAgentMac] [WebDriverAgentMac]     COMPILER_INDEX_STORE_ENABLE = NO
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[debug] [WebDriverAgentMac] [WebDriverAgentMac] { platform:macOS, arch:arm64, id:00006000-001A28A20C32801E }
[debug] [WebDriverAgentMac] [WebDriverAgentMac] { platform:macOS, arch:x86_64, id:00006000-001A28A20C32801E }
[debug] [WebDriverAgentMac] [WebDriverAgentMac] { platform:macOS, name:Any Mac }
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[debug] [WebDriverAgentMac] [WebDriverAgentMac] { platform:macOS, arch:arm64, id:00006000-001A28A20C32801E }
[debug] [WebDriverAgentMac] [WebDriverAgentMac] { platform:macOS, arch:x86_64, id:00006000-001A28A20C32801E }
[debug] [WebDriverAgentMac] [WebDriverAgentMac] { platform:macOS, name:Any Mac }
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Prepare packages
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Computing target dependency graph and provisioning inputs
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Create build description
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Build description signature: d4e7a843cea9a2df3d8a6a20642ce2e1
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Build description path: /Users/eugenechekanskiy/Library/Developer/Xcode/DerivedData/WebDriverAgentMac-cdphpannbrbsvcbdyllejdrkgvkr/Build/Intermediates.noindex/XCBuildData/d4e7a843cea9a2df3d8a6a20642ce2e1-desc.xcbuild
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] note: Building targets in dependency order
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] ** TEST BUILD SUCCEEDED **
[debug] [WD Proxy] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:10100/status] with no body
[WD Proxy] [WD Proxy] connect ECONNREFUSED 127.0.0.1:10100
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] 2023-02-20 19:42:50.876125+0200 WebDriverAgentRunner-Runner[95100:4085894] Running tests...
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Test Suite 'All tests' started at 2023-02-20 19:42:50.900
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Test Suite 'WebDriverAgentRunner.xctest' started at 2023-02-20 19:42:50.900
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Test Suite 'UITestingUITests' started at 2023-02-20 19:42:50.901
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =      nans Suite Set Up
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] Test Case '-[UITestingUITests testRunner]' started.
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     0.00s Start Test at 2023-02-20 19:42:50.902
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     0.02s Set Up
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] 2023-02-20 19:42:50.923376+0200 WebDriverAgentRunner-Runner[95100:4085894] Built at Feb 20 2023 18:50:24
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] 2023-02-20 19:42:50.927297+0200 WebDriverAgentRunner-Runner[95100:4085894] ServerURLHere->http://localhost:10100<-ServerURLHere
[debug] [WD Proxy] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:10100/status] with no body
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"version":"Version 12.6.1 (Build 21G217)"},"ready":true,"build":{"time":"Feb 20 2023 18:50:24"}},"sessionId":null}
[WebDriverAgentMac] [WebDriverAgentMac] The host process is ready within 2087ms
[debug] [WD Proxy] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:10100/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Mac","automationName":"mac2","bundleId":"com.my.app","showServerLogs":true}}}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     1.01s Open com.my.app
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     1.01s     Launch com.my.app
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] 2023-02-20 19:42:51.914536+0200 WebDriverAgentRunner-Runner[95100:4085894] Launching macOS application via NSWorkspace while sandboxed. Launch arguments and environment variables may be dropped.
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     1.35s         Wait for accessibility to load
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     2.75s         Setting up automation session
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     2.76s         Wait for com.my.app to idle
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"sessionId":"019B4282-D115-4C3B-9271-415F08783670","capabilities":{"CFBundleIdentifier":"com.my.app"}},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[WD Proxy] [WD Proxy] Determined the downstream protocol as 'W3C'
[AppiumDriver@f22b] [AppiumDriver@f22b] New Mac2Driver session created successfully, session 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528 added to master session list
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Event 'newSessionStarted' logged at 1676914973667 (19:42:53 GMT+0200 (Eastern European Standard Time))
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Cached the protocol value 'W3C' for the new session 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"Mac","automationName":"mac2","bundleId":"com.my.app","showServerLogs":true}}
[HTTP] [HTTP] <-- POST /session 200 3871 ms - 181
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
[HTTP] [HTTP] {"using":"accessibility id","value":"FileMenu"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Calling AppiumDriver.findElement() with args: ["accessibility id","FileMenu","0c2969a2-f0f3-40e6-a9ae-acf4f9a88528"]
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element] with body: {"using":"accessibility id","value":"FileMenu"}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     2.79s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     2.87s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     2.89s Get all elements bound by accessibility element for: Elements matching predicate '"FileMenu" IN identifiers'
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"FBDD38E6-4C19-4A15-8550-E200F4092712","element-6066-11e4-a52e-4f735466cecf":"FBDD38E6-4C19-4A15-8550-E200F4092712"},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"FBDD38E6-4C19-4A15-8550-E200F4092712","ELEMENT":"FBDD38E6-4C19-4A15-8550-E200F4092712"}
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element 200 156 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/FBDD38E6-4C19-4A15-8550-E200F4092712/click
[HTTP] [HTTP] {}
[Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/FBDD38E6-4C19-4A15-8550-E200F4092712/click' to command name 'click'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/FBDD38E6-4C19-4A15-8550-E200F4092712/click] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element/FBDD38E6-4C19-4A15-8550-E200F4092712/click] with body: {}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     2.95s Find the "FileMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.00s Click "FileMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.00s     Wait for com.my.app to idle
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.01s     Find the "FileMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.05s     Check for interrupting elements affecting "FileMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.05s     Synthesize event
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.48s     Wait for com.my.app to idle
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[WD Proxy] [WD Proxy] Replacing sessionId 019B4282-D115-4C3B-9271-415F08783670 with 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/FBDD38E6-4C19-4A15-8550-E200F4092712/click 200 543 ms - 65
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
[HTTP] [HTTP] {"using":"accessibility id","value":"NewObjectMenu"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Calling AppiumDriver.findElement() with args: ["accessibility id","NewObjectMenu","0c2969a2-f0f3-40e6-a9ae-acf4f9a88528"]
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element] with body: {"using":"accessibility id","value":"NewObjectMenu"}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.50s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.52s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.55s Get all elements bound by accessibility element for: Elements matching predicate '"NewObjectMenu" IN identifiers'
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"60AE237F-A544-45CC-93FD-8CCDB75797DA","element-6066-11e4-a52e-4f735466cecf":"60AE237F-A544-45CC-93FD-8CCDB75797DA"},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"60AE237F-A544-45CC-93FD-8CCDB75797DA","ELEMENT":"60AE237F-A544-45CC-93FD-8CCDB75797DA"}
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element 200 100 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/60AE237F-A544-45CC-93FD-8CCDB75797DA/click
[HTTP] [HTTP] {}
[Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/60AE237F-A544-45CC-93FD-8CCDB75797DA/click' to command name 'click'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/60AE237F-A544-45CC-93FD-8CCDB75797DA/click] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element/60AE237F-A544-45CC-93FD-8CCDB75797DA/click] with body: {}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.61s Find the "NewObjectMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.66s Click "NewObjectMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac]     t =     3.66s     Wait for com.my.app to idle
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.67s     Find the "NewObjectMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.71s     Check for interrupting elements affecting "NewObjectMenu" Button
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     3.72s     Synthesize event
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     4.13s     Wait for com.my.app to idle
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[WD Proxy] [WD Proxy] Replacing sessionId 019B4282-D115-4C3B-9271-415F08783670 with 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/60AE237F-A544-45CC-93FD-8CCDB75797DA/click 200 561 ms - 65
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
[HTTP] [HTTP] {"using":"accessibility id","value":"object"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Calling AppiumDriver.findElement() with args: ["accessibility id","object","0c2969a2-f0f3-40e6-a9ae-acf4f9a88528"]
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element] with body: {"using":"accessibility id","value":"object"}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.19s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.24s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.27s Get all elements bound by accessibility element for: Elements matching predicate '"object" IN identifiers'
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"3FD05051-AB43-42EA-A384-C573282A04BC","element-6066-11e4-a52e-4f735466cecf":"3FD05051-AB43-42EA-A384-C573282A04BC"},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"3FD05051-AB43-42EA-A384-C573282A04BC","ELEMENT":"3FD05051-AB43-42EA-A384-C573282A04BC"}
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element 200 148 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element
[HTTP] [HTTP] {"using":"accessibility id","value":"Scene"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Calling AppiumDriver.findElement() with args: ["accessibility id","Scene","0c2969a2-f0f3-40e6-a9ae-acf4f9a88528"]
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Valid locator strategies for this request: id, name, accessibility id, xpath, class name, -ios predicate string, predicate string, -ios class chain, class chain
[debug] [WD Proxy] [WD Proxy] Matched '/element' to command name 'findElement'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element] with body: {"using":"accessibility id","value":"Scene"}
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.34s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.37s Find the Application 'com.my.app'
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.39s Get all elements bound by accessibility element for: Elements matching predicate '"Scene" IN identifiers'
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"ELEMENT":"1EE367A3-AD14-48F8-8D5A-4E43B2C946B0","element-6066-11e4-a52e-4f735466cecf":"1EE367A3-AD14-48F8-8D5A-4E43B2C946B0"},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"1EE367A3-AD14-48F8-8D5A-4E43B2C946B0","ELEMENT":"1EE367A3-AD14-48F8-8D5A-4E43B2C946B0"}
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element 200 107 ms - 137
[HTTP] [HTTP] 
[HTTP] [HTTP] --> GET /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/3FD05051-AB43-42EA-A384-C573282A04BC/rect
[HTTP] [HTTP] {}
[Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/3FD05051-AB43-42EA-A384-C573282A04BC/rect' to command name 'getElementRect'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/3FD05051-AB43-42EA-A384-C573282A04BC/rect] to [GET http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element/3FD05051-AB43-42EA-A384-C573282A04BC/rect] with no body
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.47s Find the "object" Other
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.52s Find the "object" Other
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"y":224,"x":32,"width":311,"height":42},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[WD Proxy] [WD Proxy] Replacing sessionId 019B4282-D115-4C3B-9271-415F08783670 with 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[HTTP] [HTTP] <-- GET /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/3FD05051-AB43-42EA-A384-C573282A04BC/rect 200 105 ms - 101
[HTTP] [HTTP] 
[HTTP] [HTTP] --> GET /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/1EE367A3-AD14-48F8-8D5A-4E43B2C946B0/rect
[HTTP] [HTTP] {}
[Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/1EE367A3-AD14-48F8-8D5A-4E43B2C946B0/rect' to command name 'getElementRect'
[debug] [WD Proxy] [WD Proxy] Proxying [GET /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/1EE367A3-AD14-48F8-8D5A-4E43B2C946B0/rect] to [GET http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/element/1EE367A3-AD14-48F8-8D5A-4E43B2C946B0/rect] with no body
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.58s Find the "Scene" Other
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     5.64s Find the "Scene" Other
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":{"y":185,"x":357,"width":883,"height":704},"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[WD Proxy] [WD Proxy] Replacing sessionId 019B4282-D115-4C3B-9271-415F08783670 with 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[HTTP] [HTTP] <-- GET /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/element/1EE367A3-AD14-48F8-8D5A-4E43B2C946B0/rect 200 108 ms - 103
[HTTP] [HTTP] 
[HTTP] [HTTP] --> POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/actions
[HTTP] [HTTP] {"actions":[{"id":"action1","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":42,"y":234,"duration":100,"origin":"viewport"},{"type":"pointerDown","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0},{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":367,"y":195,"duration":100,"origin":"viewport"},{"type":"pointerUp","button":0}]}]}
[Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] [WD Proxy] Matched '/session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/actions' to command name 'performActions'
[debug] [WD Proxy] [WD Proxy] Proxying [POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/actions] to [POST http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670/actions] with body: {"actions":[{"id":"action1","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":42,"y":234,"duration":100,"origin":"viewport"},{"type":"pointerDown","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0},{"type":"pointerMove","button":0,"width":0,"height":0,"pressure":0,"tangentialPressure":0,"tiltX":0,"tiltY":0,"twist":0,"altitudeAngle":0,"azimuthAngle":0,"x":367,"y":195,"duration":100,"origin":"viewport"},{"type":"pointerUp","button":0}]}]}
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":"019B4282-D115-4C3B-9271-415F08783670"}
[WD Proxy] [WD Proxy] Replacing sessionId 019B4282-D115-4C3B-9271-415F08783670 with 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[HTTP] [HTTP] <-- POST /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528/actions 200 212 ms - 65
[HTTP] [HTTP] 
[HTTP] [HTTP] --> DELETE /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528
[HTTP] [HTTP] {}
[debug] [Mac2Driver@fff8 (0c2969a2)] [Mac2Driver@fff8 (0c2969a2)] Calling AppiumDriver.deleteSession() with args: ["0c2969a2-f0f3-40e6-a9ae-acf4f9a88528"]
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Event 'quitSessionRequested' logged at 1676914977813 (19:42:57 GMT+0200 (Eastern European Standard Time))
[AppiumDriver@f22b] [AppiumDriver@f22b] Removing session 0c2969a2-f0f3-40e6-a9ae-acf4f9a88528 from our master session list
[debug] [WD Proxy] [WD Proxy] Matched '/session/019B4282-D115-4C3B-9271-415F08783670' to command name 'deleteSession'
[debug] [WD Proxy] [WD Proxy] Proxying [DELETE /session/019B4282-D115-4C3B-9271-415F08783670] to [DELETE http://127.0.0.1:10100/session/019B4282-D115-4C3B-9271-415F08783670] with no body
[debug] [WebDriverAgentMac] [WebDriverAgentMac] [xcodebuild] t =     6.92s Terminate com.my.app:95107
[debug] [WD Proxy] [WD Proxy] Got response with status 200: {"value":null,"sessionId":null}
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Event 'quitSessionFinished' logged at 1676914978900 (19:42:58 GMT+0200 (Eastern European Standard Time))
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Received response: null
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] But deleting session, so not returning
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] Responding to client with driver.deleteSession() result: null
[HTTP] [HTTP] <-- DELETE /session/0c2969a2-f0f3-40e6-a9ae-acf4f9a88528 200 1089 ms - 14
[HTTP] [HTTP] 
[Appium] [Appium] Received SIGINT - shutting down
[debug] [AppiumDriver@f22b] [AppiumDriver@f22b] There are no active sessions for cleanup
[HTTP] [HTTP] Waiting until the server is closed
[HTTP] [HTTP] Received server close event
hellozyemlya commented 1 year ago

@mykola-mokhnach what is the easiest(or at least any possible) way to apply patch and test it locally? Just in case, I installed appium with npm install appium@next, and then appium driver install mac2

hellozyemlya commented 1 year ago

Found it can install from git. Will try it out.

hellozyemlya commented 1 year ago

@mykola-mokhnach I am giving up. I don't know how to install driver from sources.

hellozyemlya commented 1 year ago

@mykola-mokhnach somehow installed it. It works. Now cursor jumps directly to first position.

hellozyemlya commented 1 year ago

But looks like duration meaningless here, since it jumps immediately to position, and waits for specified time(or moving to same point for specified time, don't know how to treat it :) ). Anyway, it is much better than jumping to 0,0.

mykola-mokhnach commented 1 year ago

Cool, thanks for checking it

mykola-mokhnach commented 1 year ago

The patch has been published in mac2 driver 1.5.2