Previous:
[HTTP] <-- GET /wd/hub/session/6ec22214-b77a-4269-9de3-cc0fce8ee9f7/source 200 125 ms - 24046
[HTTP] --> POST /wd/hub/session/6ec22214-b77a-4269-9de3-cc0fce8ee9f7/element/1092CE78-0E17-4A68-B494-F1C02AB68795/click {"{}":""}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [XCUITest] Executing command 'proxyReqRes'
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/6ec22214-b77a-4269-9de3-cc0fce8ee9f7/element/1092CE78-0E17-4A68-B494-F1C02AB68795/click] to [POST http://localhost:8100/session/810EFB7F-4E88-4179-93CE-AE8E1C23372A/element/1092CE78-0E17-4A68-B494-F1C02AB68795/click] with body: {"{}":""}
[debug] [JSONWP Proxy] Got response with status 200: {"status":0,"id":"1092CE78-0E17-4A68-B494-F1C02AB68795","sessionId":"810EFB7F-4E88-4179-93CE-AE8E1C23372A","value":""}
[JSONWP Proxy] Replacing sessionId 810EFB7F-4E88-4179-93CE-AE8E1C23372A with 6ec22214-b77a-4269-9de3-cc0fce8ee9f7
[HTTP] <-- POST /wd/hub/session/6ec22214-b77a-4269-9de3-cc0fce8ee9f7/element/1092CE78-0E17-4A68-B494-F1C02AB68795/click 200 16081 ms - 118
Now:
[HTTP] --> POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element {"using":"-ios predicate string","value":"type == \"XCUIElementTypeTable\" AND name == \"TypeAheadSearchResults\""}
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: ["-ios predicate string","type == \"XCUIElementTypeTable\" AND name == \"TypeAheadSearchResults\"","ae29a2ca-46de-49cf-8749-82c1388b1fe8"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD/element] with body: {"using":"predicate string","value":"type == \"XCUIElementTypeTable\" AND name == \"TypeAheadSearchResults\""}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD","value":{"label":null,"type":"XCUIElementTypeTable","ELEMENT":"C4DB9828-9074-4E39-A1FF-25AA5DA84E4A"},"status":0}
[debug] [MJSONWP] Responding to client with driver.findElement() result: {"label":null,"type":"XCUIElementTypeTable","ELEMENT":"C4DB9828-9074-4E39-A1FF-25AA5DA84E4A"}
[HTTP] <-- POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element 200 269 ms - 165
[HTTP] --> POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element/C4DB9828-9074-4E39-A1FF-25AA5DA84E4A/element {"using":"-ios predicate string","value":"type == \"XCUIElementTypeStaticText\""}
[debug] [MJSONWP] Calling AppiumDriver.findElementFromElement() with args: ["-ios predicate string","type == \"XCUIElementTypeStaticText\"","C4DB9828-9074-4E39-A1FF-25AA5DA84E4A","ae29a2ca-46de-49cf-8749-82c1388b1fe8"]
[debug] [XCUITest] Executing command 'findElementFromElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element/C4DB9828-9074-4E39-A1FF-25AA5DA84E4A/element] to [POST http://localhost:8100/session/6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD/element/C4DB9828-9074-4E39-A1FF-25AA5DA84E4A/element] with body: {"using":"predicate string","value":"type == \"XCUIElementTypeStaticText\""}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD","value":{"label":"Mock Organization","type":"XCUIElementTypeStaticText","ELEMENT":"6C5A3811-D400-4C5B-9D28-CB30A7BDB09E"},"status":0}
[debug] [MJSONWP] Responding to client with driver.findElementFromElement() result: {"label":"Mock Organization","type":"XCUIElementTypeStaticText","ELEMENT":"6C5A3811-D400-4C5B-9D28-CB30A7BDB09E"}
[HTTP] <-- POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element/C4DB9828-9074-4E39-A1FF-25AA5DA84E4A/element 200 371 ms - 185
[HTTP] --> POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element/6C5A3811-D400-4C5B-9D28-CB30A7BDB09E/click {"{}":""}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [XCUITest] Executing command 'proxyReqRes'
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element/6C5A3811-D400-4C5B-9D28-CB30A7BDB09E/click] to [POST http://localhost:8100/session/6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD/element/6C5A3811-D400-4C5B-9D28-CB30A7BDB09E/click] with body: {"{}":""}
[debug] [JSONWP Proxy] Got response with status 200: {"status":0,"id":"6C5A3811-D400-4C5B-9D28-CB30A7BDB09E","sessionId":"6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD","value":""}
[JSONWP Proxy] Replacing sessionId 6C0EC812-A262-47F6-A3C6-9FFCC1CE65BD with ae29a2ca-46de-49cf-8749-82c1388b1fe8
[HTTP] <-- POST /wd/hub/session/ae29a2ca-46de-49cf-8749-82c1388b1fe8/element/6C5A3811-D400-4C5B-9D28-CB30A7BDB09E/click 200 685 ms - 118
So the click itself took 685 ms versus the previous 16081 ms. The initial find of the element is a little slower, 269 ms + 371 ms versus the previous 125 ms. Total time savings: 14881 ms!
I also ended up changing the rest of my xpath selectors to predicates where I could, so that might have sped up the full test suite some, though I didn’t collect numbers on how long it took before.