Hi Team,
I encountered a problem in locating elements in native iOS app:
I am able to get locators like id or XPath for clicking some images of the app screen through appium inspector but using those locators in our script do not execute tests in runtime & gives no error in console. I tried using longpress of Touchactions class for clicking those images but it failed.
Please find the appium logs below
[JSONWP Proxy] Replacing sessionId BA1222CA-578F-4F99-8C6D-F3B96A99B5A3 with 431b531f-486a-4be3-a6df-bb7fa8f62f32
[HTTP] <-- POST /wd/hub/session/431b531f-486a-4be3-a6df-bb7fa8f62f32/element/DB9FBA62-C640-40BE-A37E-8ADBB0334EE7/click 200 1629 ms - 118
[HTTP] --> POST /wd/hub/session/431b531f-486a-4be3-a6df-bb7fa8f62f32/element {“using”:“id”,“value”:“Sikkens - Intérieur”}
[MJSONWP] Calling AppiumDriver.findElement() with args: [“id”,“Sikkens - Intérieur”,“431b531f-486a-4be3-a6df-bb7fa8f62f32”]
[XCUITest] Executing command ‘findElement’
[BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[BaseDriver] Waiting up to 2000 ms for condition
[JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/BA1222CA-578F-4F99-8C6D-F3B96A99B5A3/element] with body: {“using”:“id”,“value”:“Sikkens - Intérieur”}
[JSONWP Proxy] Got response with status 200: {“value”:{“ELEMENT”:“8ADF7500-14CB-40C0-9691-15F66BC1A3AF”},“sessionId”:“BA1222CA-578F-4F99-8C6D-F3B96A99B5A3”,“status”:0}
[MJSONWP] Responding to client with driver.findElement() result: {“ELEMENT”:“8ADF7500-14CB-40C0-9691-15F66BC1A3AF”}
[HTTP] <-- POST /wd/hub/session/431b531f-486a-4be3-a6df-bb7fa8f62f32/element 200 814 ms - 122
[HTTP] --> POST /wd/hub/session/431b531f-486a-4be3-a6df-bb7fa8f62f32/element/8ADF7500-14CB-40C0-9691-15F66BC1A3AF/click {“id”:“8ADF7500-14CB-40C0-9691-15F66BC1A3AF”}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[XCUITest] Executing command ‘proxyReqRes’
[JSONWP Proxy] Proxying [POST /wd/hub/session/431b531f-486a-4be3-a6df-bb7fa8f62f32/element/8ADF7500-14CB-40C0-9691-15F66BC1A3AF/click] to [POST http://localhost:8100/session/BA1222CA-578F-4F99-8C6D-F3B96A99B5A3/element/8ADF7500-14CB-40C0-9691-15F66BC1A3AF/click] with body: {“id”:“8ADF7500-14CB-40C0-9691-15F66BC1A3AF”}
[JSONWP Proxy] Got response with status 200: {“status”:0,“id”:“8ADF7500-14CB-40C0-9691-15F66BC1A3AF”,“value”:"",“sessionId”:“BA1222CA-578F-4F99-8C6D-F3B96A99B5A3”}
[JSONWP Proxy] Replacing sessionId BA1222CA-578F-4F99-8C6D-F3B96A99B5A3 with 431b531f-486a-4be3-a6df-bb7fa8f62f32
[HTTP] <-- POST /wd/hub/session/431b531f-486a-4be3-a6df-bb7fa8f62f32/element/8ADF7500-14CB-40C0-9691-15F66BC1A3AF/click 200 1538 ms - 118
[BaseDriver] Shutting down because we waited 60 seconds for a command
[Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
[Appium] Removing session 431b531f-486a-4be3-a6df-bb7fa8f62f32 from our master session list
[XCUITest] Setting ‘755’ permissions to ‘/Users/mashboob/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/Attachments’ folder
[XCUITest] Not clearing log files. Use clearSystemFiles
capability to turn on.
[iOSLog] Stopping iOS log capture
Please go through it once and help in solving the issue