Appium Click operation is not working on Android Native App

Platform= Android 4.4.4
Appium version = 1.4.16.1
Real Device
language = java
My OS = windows

Hi,All
I am trying to click on login button (Native App) its not clicking. In appium log no errors occur, it looks like it was successful but on physical Android mobile I cannot see the click action was actually performed.

But when i performed .getText() it show the correct output

my code

package appiumdemo;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import io.appium.java_client.remote.MobilePlatform;

public class bookmys {
public AppiumDriver driver;

@Test
public void tets() throws MalformedURLException, InterruptedException
{
	File appDir = new File("src");
	File app= new File(appDir, "bookmyshow-4-0-5.apk");
	
	DesiredCapabilities cap = new DesiredCapabilities();
   cap.setCapability(MobileCapabilityType.DEVICE_NAME, "santosh");
   cap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);
   cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.4.4");
   
   cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,"100");
   cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());

   
   AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);

   Thread.sleep(3000);
   String a=driver.findElementById("com.bt.bms:id/btnLogin").getText();
   System.out.println(a);
   Thread.sleep(3000);
   driver.findElementById("com.bt.bms:id/btnLogin").click();
   Thread.sleep(3000);
}  

}

Appium Log

info: → POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“requiredCapabilities”:{}},“desiredCapabilities”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“requiredCapabilities”:{}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_112)
info: [debug] Error: Requested a new session but one was in progress
at [object Object].Appium.start (C:\Program Files (x86)\Appium\node_modules\appium\lib\appium.js:139:15)
at exports.createSession (C:\Program Files (x86)\Appium\node_modules\appium\lib\server\controller.js:188:16)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:110:13)
at Route.dispatch (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:100:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at C:\Program Files (x86)\Appium\node_modules\appium\lib\server\controller.js:39:7
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:110:13)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at Route.dispatch (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at methodOverride (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\method-override\index.js:79:5)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at trim_prefix (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:302:13)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:270:7
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at logger (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\morgan\index.js:136:5)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at trim_prefix (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:302:13)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:270:7
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\lib\read.js:111:5
at done (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\node_modules\raw-body\index.js:248:14)
at IncomingMessage.onEnd (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\node_modules\raw-body\index.js:294:7)
at IncomingMessage.g (events.js:199:16)
at IncomingMessage.emit (events.js:104:17)
at _stream_readable.js:908:16
at process._tickDomainCallback (node.js:381:11)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Requested a new session but one was in progress)”,“origValue”:“Requested a new session but one was in progress”},“sessionId”:“1fe08a37-5bf5-4d3b-96b4-41a8b4f526da”}
info: ← POST /wd/hub/session 500 10.640 ms - 250
info: → POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“requiredCapabilities”:{}},“desiredCapabilities”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“requiredCapabilities”:{}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_112)
error: Failed to start an Appium session, err was: Error: Requested a new session but one was in progress
info: [debug] Error: Requested a new session but one was in progress
at [object Object].Appium.start (C:\Program Files (x86)\Appium\node_modules\appium\lib\appium.js:139:15)
at exports.createSession (C:\Program Files (x86)\Appium\node_modules\appium\lib\server\controller.js:188:16)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:110:13)
at Route.dispatch (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:100:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at C:\Program Files (x86)\Appium\node_modules\appium\lib\server\controller.js:39:7
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:110:13)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:104:14)
at Route.dispatch (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at methodOverride (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\method-override\index.js:79:5)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at trim_prefix (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:302:13)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:270:7
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at logger (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\morgan\index.js:136:5)
at Layer.handle [as handle_request] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\layer.js:82:5)
at trim_prefix (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:302:13)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:270:7
at Function.proto.process_params (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:321:12)
at next (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\express\lib\router\index.js:261:10)
at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\lib\read.js:111:5
at done (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\node_modules\raw-body\index.js:248:14)
at IncomingMessage.onEnd (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\body-parser\node_modules\raw-body\index.js:294:7)
at IncomingMessage.g (events.js:199:16)
at IncomingMessage.emit (events.js:104:17)
at _stream_readable.js:908:16
at process._tickDomainCallback (node.js:381:11)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Requested a new session but one was in progress)”,“origValue”:“Requested a new session but one was in progress”},“sessionId”:“1fe08a37-5bf5-4d3b-96b4-41a8b4f526da”}
info: ← POST /wd/hub/session 500 10.612 ms - 250
info: [debug] Didn’t get a new command in 100 secs, shutting down…
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 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: {“value”:“OK, shutting down”,“status”:0}
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: 106.076
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
info: → POST /wd/hub/session {“capabilities”:{“desiredCapabilities”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“requiredCapabilities”:{}},“desiredCapabilities”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“requiredCapabilities”:{}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_112)
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk
info: [debug] Creating new appium session 330673c1-3162-4f25-9986-ea5bc6bc1ead
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_121
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Users\Santo\AppData\Local\Android\sdk\build-tools\25.0.2\aapt.exe
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\build-tools\25.0.2\aapt.exe dump badging C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk
info: [debug] badging package: com.bt.bms
info: [debug] badging act: com.bt.bms.activities.SplashActivity
info: [debug] Parsed package and activity are: com.bt.bms/com.bt.bms.activities.SplashActivity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device 192.168.0.2:5555
info: [debug] Setting device id to 192.168.0.2:5555
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 wait-for-device
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: Device API level is: 19
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “getprop persist.sys.language”
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk” “C:\Users\Santo\AppData\Local\Temp\com.bt.bms” en
info: [debug] No strings.xml for language ‘en’, getting default strings.xml
info: [debug] java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk” “C:\Users\Santo\AppData\Local\Temp\com.bt.bms”
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 push “C:\Users\Santo\AppData\Local\Temp\com.bt.bms\strings.json” /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Users\Santo\AppData\Local\Android\sdk\build-tools\25.0.2\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\build-tools\25.0.2\aapt.exe dump xmltree C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk AndroidManifest.xml
info: [debug] Set app process to: com.bt.bms
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk.
info: [debug] executing cmd: java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\Users\Santo\AppData\Local\Android\sdk\build-tools\25.0.2\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\build-tools\25.0.2\zipalign.exe -f 4 C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk C:\Users\Santo\AppData\Local\Temp\11726-9568-4ppnx6\appium.tmp
info: [debug] MD5 for app is c70e92d38e6a6b334d65a3abaf8e2798
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “ls /data/local/tmp/c70e92d38e6a6b334d65a3abaf8e2798.apk”
info: [debug] Getting install status for com.bt.bms
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “pm list packages -3 com.bt.bms”
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “am force-stop com.bt.bms”
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “pm clear com.bt.bms”
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 push “C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 install “C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 install “C:\Program Files (x86)\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: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.bt.bms -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] open: Permission denied
info: [debug] [UIAUTOMATOR STDOUT] open: Permission denied
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] json loading complete.
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: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “dumpsys window”
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
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: {“value”:“/data/local/tmp”,“status”:0}
info: [debug] dataDir set to: /data/local/tmp
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: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “getprop ro.build.version.sdk”
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:false,“status”:0}
info: [debug] Device is at API Level 19
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.bt.bms/com.bt.bms.activities.SplashActivity”
info: [debug] Waiting for pkg “com.bt.bms” and activity “com.bt.bms.activities.SplashActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “dumpsys window windows”
info: [debug] executing cmd: C:\Users\Santo\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.0.2:5555 shell “getprop ro.build.version.release”
info: [debug] Device is at release version 4.4.4
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to 100 secs
info: [debug] Appium session started with sessionId 330673c1-3162-4f25-9986-ea5bc6bc1ead
info: ← POST /wd/hub/session 303 11255.856 ms - 74
info: → GET /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.4”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“192.168.0.2:5555”,“newCommandTimeout”:“100”},“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: ← GET /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead 200 3.177 ms - 654 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.4”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“santosh”,“newCommandTimeout”:“100”,“platformVersion”:“4.4.4”},“app”:“C:\Users\Santo\workspace\Appium\src\bookmyshow-4-0-5.apk”,“platformName”:“Android”,“deviceName”:“192.168.0.2:5555”,“newCommandTimeout”:“100”},“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: → POST /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element {“using”:“id”,“value”:“com.bt.bms:id/btnLogin”}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“id”,“selector”:“com.bt.bms:id/btnLogin”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.bt.bms:id/btnLogin”,“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 com.bt.bms:id/btnLogin using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.bt.bms:id/btnLogin]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:{“ELEMENT”:“1”},“status”:0}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: ← POST /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element 200 233.901 ms - 87 {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: → GET /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element/1/text {}
info: [debug] Pushing command to appium work queue: [“element:getText”,{“elementId”:“1”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getText”,“params”:{“elementId”:“1”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getText
info: [debug] Responding to client with success: {“status”:0,“value”:“Login”,“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: ← GET /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element/1/text 200 16.664 ms - 79 {“status”:0,“value”:“Login”,“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“Login”,“status”:0}
info: → POST /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element {“using”:“id”,“value”:“com.bt.bms:id/btnLogin”}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“id”,“selector”:“com.bt.bms:id/btnLogin”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.bt.bms:id/btnLogin”,“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 com.bt.bms:id/btnLogin using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.bt.bms:id/btnLogin]
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: ← POST /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element 200 18.045 ms - 87 {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:{“ELEMENT”:“2”},“status”:0}
info: → POST /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/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: {“value”:true,“status”:0}
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}
info: ← POST /wd/hub/session/330673c1-3162-4f25-9986-ea5bc6bc1ead/element/2/click 200 40.728 ms - 76 {“status”:0,“value”:true,“sessionId”:“330673c1-3162-4f25-9986-ea5bc6bc1ead”}

## TestNG Result

## UIAutomator View

Try with FindByUIautomator

i used FindByUIautomator its not working

Did you tried this?

driver.findElementByAndroidUIAutomator("text(\"Login\")").click();

yes i tried

@Test
public void tets() throws MalformedURLException, InterruptedException
{
File appDir = new File(“src”);
File app= new File(appDir, “bookmyshow-4-0-5.apk”);

	DesiredCapabilities cap = new DesiredCapabilities();
   cap.setCapability(MobileCapabilityType.DEVICE_NAME, "santosh");
   cap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);
   cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.4.4");
   
   cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,"100");
   cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());

   
   AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);

   Thread.sleep(3000);
   String a=driver.findElementById("com.bt.bms:id/btnLogin").getText();
   System.out.println(a);
   Thread.sleep(3000);
  // driver.findElementById("com.bt.bms:id/btnLogin").click();
   driver.findElementByAndroidUIAutomator("text(\"Login\")").click();
   Thread.sleep(3000);
}  

}

yes i tried still not working

What’s the output when you do something simple like this…

            AndroidElement btnLogin = (AndroidElement) driver.findElementById("btnLogin");

            System.out.println(btnLogin.getText());
            System.out.println(btnLogin.isDisplayed());
            System.out.println(btnLogin.isEnabled());
            System.out.println(btnLogin.getRect());

            btnLogin.click();
AndroidElement btnLogin = (AndroidElement) driver.findElementById("btnLogin")

    System.out.println(btnLogin.getText());       -------->     Login    
    System.out.println(btnLogin.isDisplayed());  -------->    true
    System.out.println(btnLogin.isEnabled());  -------->       true
    System.out.println(btnLogin.getRect());  -----> That URL did not map to a valid JSONWP resource


        btnLogin.click();    ------> not clicking

Instead of click event you can use tap which is more mobile action , something like

protected void tapEvent(WebElement el,String elName) {
logger.info(" Tap " +elName);
driver.tap(1,el,2000);
}

Something else to try
AndroidElement btnLogin = (AndroidElement) driver.findElementByClassName(“android.widget.Button”)
btnLogin.Click();