scrollTo throws UiObjectNotFoundException though object exists

Why scrollTo fails in some instances even though the object exists.

Though it scrolls and click on some objects, it is throwing UiObjectNotFoundException.

Find below it click on Views object but still throwing UiObjectNotFoundException exception.

But it is not able to click on “TableLayout” object though the object exists.

Following is sample code which i am trying:

	public static void main(String[] args) throws MalformedURLException 
	{
		AndroidDriver driver=null;
		DesiredCapabilities caps=new DesiredCapabilities();
		caps.setCapability("deviceName", "emulator-5554");
		caps.setCapability("appPackage", "com.example.android.apis");
		caps.setCapability("appActivity", ".ApiDemos");
		
		driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),caps);
		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
		
		driver.scrollTo("Views").click();
		driver.scrollTo("Layouts").click();
//		driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().descriptionContains(\"TableLayout\").instance(0))").click();
//		driver.scrollTo("TableLayout").click();
		driver.scrollToExact("TableLayout").click();
		driver.scrollTo("01. Basic").click();
		WebElement weFirstCell=driver.findElementByXPath("//android.widget.TableRow[0]/android.widget.TextView[0]");
		System.out.println(weFirstCell.getText());
		driver.quit();
		
	}

Getting below Appium Logs:
info: --> POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.example.android.apis”,“appActivity”:".ApiDemos",“platformName”:“Android”,“deviceName”:“emulator-5554”}}
> info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
> info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
> info: [debug] Creating new appium session d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e
> info: Starting android appium
> info: [debug] Getting Java version
> info: Java version is: 1.8.0_25
> info: [debug] Using fast reset? true
> info: [debug] Preparing device for session
> info: [debug] Not checking whether app is present since we are assuming it’s already on the device
> info: [debug] Checking whether adb is present
> info: [debug] Using adb from D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe
> info: Retrieving device
> info: [debug] Trying to find a connected android device
> info: [debug] Getting connected devices…
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe devices
> info: [debug] 1 device(s) connected
> info: Found device emulator-5554
> info: [debug] Setting device id to emulator-5554
> info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 wait-for-device
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “echo ‘ready’”
> info: [debug] Starting logcat capture
> warn: No app capability, can’t parse package/activity
> info: [debug] Getting device API level
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
> info: [debug] Device is at API Level 21
> info: Device API level is: 21
> info: [debug] Apk doesn’t exist locally
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “rm -rf /data/local/tmp/strings.json”
> info: [debug] Not uninstalling app since server not started with --full-reset
> info: [debug] Skipping install since we launched with a package instead of an app path
> info: [debug] Forwarding system:4724 to device:4724
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
> info: [debug] Pushing appium bootstrap to device…
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 push “D:\Softwares\AppiumForWindows-1.3.4.1\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
> info: [debug] Pushing settings apk to device…
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 install “D:\Softwares\AppiumForWindows-1.3.4.1\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
> info: [debug] Pushing unlock helper app to device…
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 install “D:\Softwares\AppiumForWindows-1.3.4.1\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
> info: Starting App
> info: [debug] Attempting to kill all ‘uiautomator’ processes
> info: [debug] Getting all processes with ‘uiautomator’
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “ps ‘uiautomator’”
> info: [debug] No matching processes found
> info: [debug] Running bootstrap
> info: [debug] spawning: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
> info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
> info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
> info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
> info: [debug] [BOOTSTRAP] [debug] Loading json…
> info: [debug] Waking up device if it’s not alive
> info: [debug] Pushing command to appium work queue: [“wake”,{}]
> info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
> info: [debug] [BOOTSTRAP] [debug] Client connected
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: wake
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “dumpsys window”
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
> info: [debug] Screen already unlocked, continuing.
> info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:"/data"}
> info: [debug] dataDir set to: /data
> info: [debug] Pushing command to appium work queue: [“compressedLayoutHierarchy”,{“compressLayout”:false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“compressedLayoutHierarchy”,“params”:{“compressLayout”:false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
> info: [debug] Getting device API level
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
> info: [debug] Device is at API Level 21
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.example.android.apis/.ApiDemos”
> info: [debug] Waiting for pkg “com.example.android.apis” and activity “.ApiDemos” to be focused
> info: [debug] Getting focused package and activity
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “dumpsys window windows”
> info: [debug] Device launched! Ready for commands
> info: [debug] Setting command timeout to the default of 60 secs
> info: [debug] Appium session started with sessionId d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e
> info: <-- POST /wd/hub/session 303 4184.854 ms - 9
> info: --> GET /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e {}
> info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.1”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.example.android.apis”,“appActivity”:".ApiDemos",“platformName”:“Android”,“deviceName”:“emulator-5554”},“appPackage”:“com.example.android.apis”,“appActivity”:".ApiDemos",“platformName”:“Android”,“deviceName”:“emulator-5554”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- GET /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e 200 0.889 ms - 567 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.1”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.example.android.apis”,“appActivity”:".ApiDemos",“platformName”:“Android”,“deviceName”:“emulator-5554”},“appPackage”:“com.example.android.apis”,“appActivity”:".ApiDemos",“platformName”:“Android”,“deviceName”:“emulator-5554”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: --> POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/timeouts/implicit_wait {“ms”:30000}
> info: [debug] Set Android implicit wait to 30000ms
> info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/timeouts/implicit_wait 200 0.660 ms - 76 {“status”:0,“value”:null,“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: --> POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element {“using”:"-android uiautomator",“value”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().descriptionContains(“Views”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(“Views”).instance(0));”}
> info: [debug] Waiting up to 30000ms for condition
> info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().descriptionContains(“Views”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(“Views”).instance(0));”,“context”:"",“multiple”:false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().descriptionContains(“Views”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(“Views”).instance(0));”,“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 new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().descriptionContains(“Views”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(“Views”).instance(0)); using ANDROID_UIAUTOMATOR with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().descriptionContains(“Views”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().descriptionContains(“Views”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().descriptionContains(“Views”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “Views”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException with: com.android.uiautomator.core.UiObject@11f492fb
> info: [debug] [BOOTSTRAP] [debug] Invoke complete.
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(“Views”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().textContains(“Views”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().textContains(“Views”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “Views”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CONTAINS_DESCRIPTION=Views, INSTANCE=0]
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CONTAINS_TEXT=Views, INSTANCE=0]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“1”}}
> info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element 200 4025.999 ms - 87 {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: --> POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element/1/click {“id”:“1”}
> info: [debug] Pushing command to appium work queue: [“element:click”,{“elementId”:“1”}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“1”}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: click
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
> info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element/1/click 200 478.429 ms - 76 {“status”:0,“value”:true,“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: --> POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element {“using”:"-android uiautomator",“value”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“Layouts”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“Layouts”).instance(0));”}
> info: [debug] Waiting up to 30000ms for condition
> info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“Layouts”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“Layouts”).instance(0));”,“context”:"",“multiple”:false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“Layouts”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“Layouts”).instance(0));”,“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 new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“Layouts”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“Layouts”).instance(0)); using ANDROID_UIAUTOMATOR with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“Layouts”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().description(“Layouts”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().description(“Layouts”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “Layouts”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException with: com.android.uiautomator.core.UiObject@130d3f18
> info: [debug] [BOOTSTRAP] [debug] Invoke complete.
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“Layouts”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().text(“Layouts”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().text(“Layouts”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “Layouts”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException with: com.android.uiautomator.core.UiObject@a6d5d71
> info: [debug] [BOOTSTRAP] [debug] Invoke complete.
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=Layouts, INSTANCE=0]
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=Layouts, INSTANCE=0]
> info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element 200 27167.526 ms - 87 {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“2”}}
> info: --> POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element/2/click {“id”:“2”}
> info: [debug] Pushing command to appium work queue: [“element:click”,{“elementId”:“2”}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“2”}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: click
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
> info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element/2/click 200 467.235 ms - 76 {“status”:0,“value”:true,“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: --> POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element {“using”:"-android uiautomator",“value”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”}
> info: [debug] Waiting up to 30000ms for condition
> info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”,“context”:"",“multiple”:false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”,“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 new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0)); using ANDROID_UIAUTOMATOR with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().description(“TableLayout”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().description(“TableLayout”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “TableLayout”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException with: com.android.uiautomator.core.UiObject@396f6756
> info: [debug] [BOOTSTRAP] [error] com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[INSTANCE=0, SCROLLABLE=true]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:9,“value”:“Could not parse UiSelector argument: problem using reflection to call this method”}
> info: [debug] Waited for 12425ms so far
> info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”,“context”:"",“multiple”:false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”,“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 new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0)); using ANDROID_UIAUTOMATOR with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().description(“TableLayout”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().description(“TableLayout”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “TableLayout”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException with: com.android.uiautomator.core.UiObject@286f63d7
> info: [debug] [BOOTSTRAP] [error] com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[INSTANCE=0, SCROLLABLE=true]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:9,“value”:“Could not parse UiSelector argument: problem using reflection to call this method”}
> info: [debug] Waited for 24351ms so far
> info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”,“context”:"",“multiple”:false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:"-android uiautomator",“selector”:“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0));”,“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 new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0));new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“TableLayout”).instance(0)); using ANDROID_UIAUTOMATOR with the contextId: multiple: false
> info: [debug] [BOOTSTRAP] [debug] Parsing scrollable: new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(“TableLayout”).instance(0))
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: boolean arg: true
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] UiScrollable invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException args: new UiSelector().description(“TableLayout”).instance(0),
> info: [debug] [BOOTSTRAP] [debug] UiScrollable coerce type: class com.android.uiautomator.core.UiObject arg: new UiSelector().description(“TableLayout”).instance(0)
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “TableLayout”
> info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: int arg: 0
> info: [debug] [BOOTSTRAP] [debug] Method name: scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Setting uiObject for scrollIntoView
> info: [debug] [BOOTSTRAP] [debug] Invoking method: public boolean com.android.uiautomator.core.UiScrollable.scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException with: com.android.uiautomator.core.UiObject@372334c4
> info: [debug] [BOOTSTRAP] [error] com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[INSTANCE=0, SCROLLABLE=true]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:9,“value”:“Could not parse UiSelector argument: problem using reflection to call this method”}
> info: [debug] Condition unmet after 36284ms. Timing out.
> info: [debug] Responding to client with error: {“status”:9,“value”:{“message”:“The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.”,“origValue”:“Could not parse UiSelector argument: problem using reflection to call this method”},“sessionId”:“d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e”}
> info: <-- POST /wd/hub/session/d2367ac0-ff56-4dea-b1dc-2a9b4137ae3e/element 500 36281.820 ms - 317
> info: [debug] Didn’t get a new command in 60 secs, shutting down…
> info: Shutting down appium session
> info: [debug] Pressing the HOME button
> info: [debug] executing cmd: D:\Softwares\android-sdk_r24.0.2-windows\android-sdk-windows\platform-tools\adb.exe -s emulator-5554 shell “input keyevent 3”
> info: [debug] Stopping logcat capture
> info: [debug] Logcat terminated with code null, signal SIGTERM
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
> info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
> info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
> info: [debug] [BOOTSTRAP] [debug] Closed client connection
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
> info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
> info: [debug] [UIAUTOMATOR STDOUT] Time: 119.258
> info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
> info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
> info: [debug] UiAutomator shut down normally
> info: [debug] Cleaning up android objects
> info: [debug] Cleaning up appium session
> info: [debug] We shut down because no new commands came in