How to click on button of ReactNative application if component is clickable=false

Hello all,
I am trying to automate Android application and it is developed in ReactNative. I am not able to click on button because button is clickable=false and I don’t have any Resource id or content desc so i m unable to locate element…please help me
Thank You

@Ajinkya share to as at your output with needed screen of:

// java

and which button you trying to tap.

@Aleksei I am trying to tap login button but it is clickable = false I am trying to tap button with its coordinates but it throws me exception

@Ajinkya we do not have your code and your app to check. share something with us and we can help. code (how you try to tap) and pageSource.

Actions action= new Actions(driver);
WebElement elt = driver.findElementByClassName(“android.widget.FrameLayout[0]”);
action.moveToElement(elt, 611, 722).click().perform();
I am trying this

and driver.findElement(By.className(“android.view.ViewGroup[@index=‘4’]”)).click();
This way but not able to click


// Actions action= new Actions(driver);
// action.moveToElement(elt, 611, 722).click().perform(); - not correct. 
// it is needed something like
 new TouchAction((MobileDriver) drive).press(startx, starty).waitAction(duration).moveTo(endx, endy).release().perform();
// driver.findElement(By.className(“android.view.ViewGroup[@index=‘4’]”)).click(); -> 
driver.findElements(MobileBy.className(“android.view.ViewGroup”)).get(3).click(); // starting from 0,1,2,3,....

what should be startx, starty and endx, endy I means I have only X & Y co-ordinates

It is also not working beceause Clickable= ‘false’ in UI automator

@Ajinkya they are it is coordinates. use your X,Y from to. you can also use elements instead of coordinates.

Still it is not working it giving exception
Exception in thread “main” java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebDriver cannot be cast to io.appium.java_client.MobileDriver

your driver should be AppiumDriver :slight_smile:

Sorry didn’t get this answer of AppiumDriver?? actually i have appium driver but i cannot understand where I have to declare him or how to declare?

@Ajinkya - here to try

I have tried my code with your code of Appium Driver but I am getting this error
Exception in thread “main” java.lang.NoClassDefFoundError: org/openqa/selenium/NoSuchSessionException
at io.appium.java_client.AppiumDriver.(
at sunrise.SampleProg.main(
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.NoSuchSessionException
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
… 3 more