Working on Android Emulator.
I have a slider in the app with a list of values.
I want to scroll to each of them by using scrollTo js script:
swipeObject.put("element", elementID);
swipeObject.put("text", textToFind);
js.executeScript("mobile: scrollTo", swipeObject);
What i get is that there are elements that cannot be found in the slider. Though this behavior appears randomly and on different elements. So i cannot find on wich element it will stop sliding next time.
The slider just stops to slide.
=====================================
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:scrollTo”,“params”:{“text”:“VintageIvory”,“direction”:“left”,“elementId”:“25”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: scrollTo
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.5”,“revision”:“a124a15677e26b33db16e81c4b3b34d9c6b8cac9”}},“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: <-- GET /wd/hub/status 200 1.221 ms - 155 {“status”:0,“value”:{“build”:{“version”:“1.3.5”,“revision”:“a124a15677e26b33db16e81c4b3b34d9c6b8cac9”}},“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.3.5”,“revision”:“a124a15677e26b33db16e81c4b3b34d9c6b8cac9”}},“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: <-- GET /wd/hub/status 200 1.093 ms - 155 {“status”:0,“value”:{“build”:{“version”:“1.3.5”,“revision”:“a124a15677e26b33db16e81c4b3b34d9c6b8cac9”}},“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:13,“value”:“Could not scroll element into view: VintageIvory”}
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“Could not scroll element into view: VintageIvory”},“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: <-- POST /wd/hub/session/62c2bb1a-740a-4d95-9fc2-7562388e0451/execute 500 10532.878 ms - 217
info: --> POST /wd/hub/session/62c2bb1a-740a-4d95-9fc2-7562388e0451/timeouts/implicit_wait {“ms”:60000}
info: [debug] Set Android implicit wait to 60000ms
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: <-- POST /wd/hub/session/62c2bb1a-740a-4d95-9fc2-7562388e0451/timeouts/implicit_wait 200 1.214 ms - 76 {“status”:0,“value”:null,“sessionId”:“62c2bb1a-740a-4d95-9fc2-7562388e0451”}
info: --> POST /wd/hub/session/62c2bb1a-740a-4d95-9fc2-7562388e0451/element {“using”:“name”,“value”:“VintageIvory”}
info: [debug] Waiting up to 60000ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“name”,“selector”:“VintageIvory”,“context”:"",“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“name”,“selector”:“VintageIvory”,“context”:"",“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding VintageIvory using NAME with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=VintageIvory, INSTANCE=0]
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=VintageIvory, INSTANCE=0]
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding VintageIvory using NAME with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=VintageIvory, INSTANCE=0]
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=VintageIvory, INSTANCE=0]
info: [debug] Waited for 139ms so far
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:7,“value”:“No element found”}