I’m trying to execute the below code, using java client 5.0.2. It was working with previous versions of appium, after updating, it stopped working
driver.manage().timeouts().implicitlyWait(5000, TimeUnit.MILLISECONDS);
Below is the debug of the POST, my script executes but fails at a point where app takes time to load.
[HTTP] {“type”:“implicit”,“ms”:5000}
[debug] [W3C] Bad parameters: BadParametersError: Parameters were incorrect. We wanted “W3C protocol expects any of script, pageLoad or implicit to be set” and you sent {“type”:“implicit”,“ms”:5000}
[HTTP] <-- POST /wd/hub/session/b72a3346-d51d-423f-9338-c55239fe2401/timeouts 400 30 ms - 4194
[HTTP]
[HTTP] --> POST /wd/hub/session/b72a3346-d51d-423f-9338-c55239fe2401/element
[HTTP] {“using”:“xpath”,“value”:"//XCUIElementTypeTabBar/XCUIElementTypeButton[@name=‘Account’]"}
[debug] [W3C] Calling AppiumDriver.findElement() with args: [“xpath”,"//XCUIElementTypeTabBar/XCUIElementTypeButton[@name=‘Account’]",“b72a3346-d51d-423f-9338-c55239fe2401”]
[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/F8A9C243-7E60-4CFF-B0AF-8A577FE23193/element] with body: {“using”:“xpath”,“value”:"//XCUIElementTypeTabBar/XCUIElementTypeButton[@name=‘Account’]"}
[debug] [JSONWP Proxy] Got response with status 200: {“value”:{“ELEMENT”:“12000000-0000-0000-0702-000000000000”},“sessionId”:“F8A9C243-7E60-4CFF-B0AF-8A577FE23193”,“status”:0}
[debug] [W3C] Responding to client with driver.findElement() result: {“ELEMENT”:“12000000-0000-0000-0702-000000000000”}
[HTTP] <-- POST /wd/hub/session/b72a3346-d51d-423f-9338-c55239fe2401/element 200 1155 ms - 122
[HTTP]
[HTTP] --> POST /wd/hub/session/b72a3346-d51d-423f-9338-c55239fe2401/element/12000000-0000-0000-0702-000000000000/click
[HTTP] {“id”:“12000000-0000-0000-0702-000000000000”}
[W3C] Driver proxy active, passing request on via HTTP proxy
[debug] [XCUITest] Executing command ‘proxyReqRes’
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/b72a3346-d51d-423f-9338-c55239fe2401/element/12000000-0000-0000-0702-000000000000/click] to [POST http://localhost:8100/session/F8A9C243-7E60-4CFF-B0AF-8A577FE23193/element/12000000-0000-0000-0702-000000000000/click] with body: {“id”:“12000000-0000-0000-0702-000000000000”}
[debug] [JSONWP Proxy] Got response with status 200: {“status”:0,“id”:“12000000-0000-0000-0702-000000000000”,“value”:"",“sessionId”:“F8A9C243-7E60-4CFF-B0AF-8A577FE23193”}
[JSONWP Proxy] Replacing sessionId F8A9C243-7E60-4CFF-B0AF-8A577FE23193 with b72a3346-d51d-423f-9338-c55239fe2401
[HTTP] <-- POST /wd/hub/session/b72a3346-d51d-423f-9338-c55239fe2401/element/12000000-0000-0000-0702-000000000000/click 200 612 ms - 118
[HTTP]