Problem to access to the XCUIElementTypePickerWheel element with javascript appium on IOS Native app


I am new in mobile app automation tests. I am trying to select an element of an XCUIElementTypePickerWheel. Here is what I did:


    selectCountry(country) {
            return -ios predicate string:type=='XCUIElementTypePickerWheel' AND value=='${country}';


        iSelectCountry: async function (country) {
                let selector = Screen.selectCountry(country);
                let Country = await $(selector);
                browser.execute("mobile: scroll", [{direction: "down", element: Country}]) //scroll to the element to click
                await; },


        When(/^I select a country "(.*)"$/, async function (country) {
            await action_words.iSelectCountry(country);

And here is what I get:

Error: Can’t call click on element with selector “-ios predicate string:type==‘XCUIElementTypePickerWheel’ AND value==‘Espagne’” because element wasn’t found

I am trying to select a country in order to sign in.

I am using appium 1.20.2 Node 14.16.0 wdio/cli": “^7.7.3”

The list look like this:

Does anyone have an idea why I get this error and how to solve the problem please?
Thank you for your help

try set value instead. Java ->

Thank you for your response.
I have found a way to bypass the problem by creating a config file for each country/language.

Hi @Fatma, could you provide a solution? I am facing same issue.