Unable to locate an element with latest appium python client version

Hi Team,
I am working on automating the IOS and Android mobile apps using Appium, and Robot Framework.
Recently I have upgraded the Robotframework version 5, Appium Python Client version 2.7.0, and selenium version 4.2.0.
After upgrading the version to the latest ones observing this issue when I trigger any script: AttributeError: ‘WebDriver’ object has no attribute ‘find_elements_by_accessibility_id’

Here is the locator I am using:
${sign_in} accessibility_id=Sign In Button

Note: Working fine with old versions I mean Robotframework version 5, Appium Python Client version 2.4.0, and selenium version 4.2.0.

Could someone help me on resolving this issue? like how to write locator in robotframework.

Looks like this was depreciated in 2.1.0:
And removed in 2.7.0:

Replaced by:

(Bonus) Example test using AppiumBy:

Yeah, it is deprecated and unable to frame the locator. Could you help me how to write locator (locator syntax) in the new Appium python client version.

Previously i use to write: ${sign_in} accessibility_id=Sign In Button

But by using that i am observing “AttributeError: ‘WebDriver’ object has no attribute ‘find_elements_by_accessibility_id’” error message.

I also tried writing the locator in the below formats but didn’t work.
${sign_in} AppiumBy.accessibility_id=Sign In Button
${sign_in} By.accessibility_id=Sign In Button
At present, I am calling AppiumLibrary in my code. below are the libraries i am using:
Library OperatingSystem
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library AppiumLibrary
Library DateTime
Library String
If I need to install any other libraries let me know.
Could you help me in writing the locator exactly in Robot Framework?

Unfortunately I’m not much of a Python programmer. However, did the example tests not give some info on how to do this? Specifically, this looks like it could do what you want:

el = wait_for_element(self.driver, AppiumBy.CLASS_NAME, ‘android.widget.ListView’)

sub_el = el.find_element(by=AppiumBy.ACCESSIBILITY_ID, value=‘Task Take out Trash’) # type: WebElement

Additionally, if you go up one level there are multiple search_context tests. Do none of these meet your needs?

I used AppiumBy. Accessibility_ID=xxxxxx but didn’t worked. Observing below error
ValueError: Element locator with prefix ‘AppiumBy. Accessibility_ID’ is not supported

Right. That’s not really the syntax. Here is the official documentation:


Which is very similar to what I posted above. Maybe a second example helps?