org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:

Element is visible but still Appium is not tapping over any element available in that screen. Whereas I can able to access the elements in previous screen.

I’ve tried by all possible means

And using pageobjects too. Also tried with xpath, but still can’t able to access the element.
I tried with both Appium version 1.8 and 1.10. Please help me on this

Server log:

[HTTP] {“using”:“id”,“value”:“AddNewFarmer”} [debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“id”,“AddNewFarmer”,“c5acec26-3a1f-495a-a9c2-574ef2a17a69”] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“AddNewFarmer”,“context”:"",“multiple”:true}} [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“AddNewFarmer”,“context”:"",“multiple”:true}} [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘AddNewFarmer’ using ‘ID’ with the contextId: ‘’ multiple: true [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0) [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0,] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=android:id/AddNewFarmer] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=android:id/AddNewFarmer] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0) [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements tmp selector:UiSelector[INSTANCE=0, RESOURCE_ID=android:id/AddNewFarmer] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[RESOURCE_ID=AddNewFarmer] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] getElements selector:UiSelector[RESOURCE_ID=AddNewFarmer] [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Element[] is null: (0)


Error log:

org.openqa.selenium.NoSuchElementException: Can’t locate an element by this strategy: Locator map: - native content: “ AddNewFarmer” - html content: “by id or name “addNewFarmer”” For documentation on this error, please visit: Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’ System info: host: ‘INCHN-LAP960’, ip: ‘’, ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_172’ Driver info: driver.version: unknown at io.appium.java_client.pagefactory.AppiumElementLocator.findElement( at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept( at$$EnhancerByCGLIB$$c0b591f0.toString() at java.lang.String.valueOf( at java.lang.StringBuilder.append( at$10.toString( at at com.olamnet.OFIS.utilities.ActionItems.waitAction( at com.olamnet.OFIS.commonActions.LoginEnumerator.loginWithValidEnumeratorId( at com.olamnet.OFIS.stepDefinition.LoginEnumeratorStep.enter_a_valid_Enumerator_ID_and_verify( at ?.Then Enter a valid Enumerator ID and verify(EnumeratorLogin.feature:13)

Hi @Thamarai_Selvi, Have you used implicit wait here??

Hey @sachin925

Hey, tried several ways to find my element, error still shows up.

  1. From the below list , tried all locator strategy in Python , but no help.

#elu = driver.find_element_by_xpath("//*[contains(@text, ‘Baddebt Collection’)]")

elv = driver.find_element_by_xpath(’//android.widget.TextView[@text= “Baddebt Collection”]’)

#elk = driver.find_element_by_name(“Baddebt Collection”)

#el78 = driver.find_element_by_id(“”)

#elb = driver.find_element_by_xpath("//*[@name=‘Baddebt Collection’]")


I’m getting the same error while automating react native app, Any solution for this?
I tried @FindBy instead of @AndroidFindBy but still the same.
I’m using appium version 1.20.0. Can anyone please help with this?