Not able to click on elements in apppium


#1

Environment

  • Appium version : 1.13
  • Desktop OS/version : Win10
  • Mobile platform/version : Andorid
  • Real device or emulator/simulator: Have use Emulator

Appium Logs

[MJSONWP (9c1ecbfd)] Responding to client with driver.createSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“app”:“D:\GRS_Android_Automation\Appium\apk\inv-app-3.3.086-5-DEV-debug.apk”,“appPackage”:“com.ghx.grs.inventory”,“appActivity”:“com.ghx.grs.inventory.MainActivity”,“newCommandTimeout”:10000,“platformName”:“Android”,“version”:“7.1.1”,“deviceName”:“emulator-5554”},“app”:“D:\GRS_Android_Automation\Appium\apk\inv-app-3.3.086-5-DEV-debug.apk”,“appPackage”:“com.ghx.grs.inventory”,“appActivity”:“com.ghx.grs.inventory.MainActivity”,“newCommandTimeout”:10000,“platformName”:“Android”,“version”:“7.1.1”,“deviceName”:“emulator-5554”,“deviceUDID”:“emulator-5554”,“platformVersion”:“7.1.1”,“deviceScreenSize”:“720x1280”,“deviceModel”:“Android SDK built for x86”,“deviceManufacturer”:“Google”}
[HTTP] <-- POST /wd/hub/session 200 65540 ms - 970
[HTTP]
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[HTTP] --> POST /wd/hub/session/9c1ecbfd-14a7-4291-b684-24dfa88db783/element
[HTTP] {“using”:“xpath”,“value”:"//android.widget.Button[contains(@text,‘LOGIN’)]"}
[MJSONWP (9c1ecbfd)] Calling AppiumDriver.findElement() with args: [“xpath”,"//android.widget.Button[contains(@text,‘LOGIN’)]",“9c1ecbfd-14a7-4291-b684-24dfa88db783”]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 0 ms for condition
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.Button[contains(@text,‘LOGIN’)]",“context”:"",“multiple”:false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.Button[contains(@text,‘LOGIN’)]",“context”:"",“multiple”:false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘//android.widget.Button[contains(@text,‘LOGIN’)]’ using ‘XPATH’ with the contextId: ‘’ multiple: false

I have tried

By.xpath("//android.widget.Button[contains(@text,‘LOGIN’)]");
//By.xpath("//android.widget.Button[1][@text=‘LOGIN’]");
//MobileBy.AndroidUIAutomator(“new UiSelector().textContains(”"+LOGIN+"")");
//MobileBy.AndroidUIAutomator(“LOGIN”);
//By.xpath("//android.widget.Button[1][@text=‘LOGIN’]");
//By.xpath("// [@Class=‘android.widget.Button’ and @index=‘2’]");
//By.className(“android.widget.Button”);
//By.xpath("//
[@Class=‘android.widget.Button’ and @index=‘2’]");
//By.xpath("//*[contains(@Class, ‘android.widget.Button’)][contains(text(),‘LOGIN’)]");