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

Hello,

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

screen.js

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

action_words.js

        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 Country.click(); },

step_definitions.js

        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 -> http://appium.io/docs/en/writing-running-appium/tutorial/swipe/ios-picker-wheels-set-value/