Unable to inspect Picker/Dropdown on Appium Inspector(iOS)

I want to select Other option from the picker/dropdown how can we find the element by using -ios class chain ? , currently I’m using .click(‘xpath’, '//XCUIElementTypePickerWheel[@value=“Other Role”) but is not working . Please find the attached Screeenshots

Try instead:

        WebElement pickerWheel = driver.findElement(AppiumBy.className("XCUIElementTypePickerWheel"));
        pickerWheel.sendKeys("Other Role");
        WebElement doneButton = driver.findElement(AppiumBy.iOSNsPredicateString("name == 'Done' OR value == 'Done'"));

Hi @Aleksei , Are you saying like this

similar. Mine example in Java

and where it has any error?

Hi @Aleksei I updated Appium app inspector and now its showing xpath and I’m performing like this .click(’//XCUIElementTypePickerWheel[@value=“Other Role”]/XCUIElementTypeOther[1]’) But it is not working

it will not work. you need sendKeys (old setValue) instead

@Aleksei sendKeys are not working it is unable to scroll or select “Other Role” from the XCUIElementTypePickerWheel , I tried

.sendKeys(‘xpath’, ‘//XCUIElementTypePickerWheel[@value=“Other Role”]’, ‘Other Role’)
.setValue(‘xpath’, ‘//XCUIElementTypePickerWheel[@value=“Other Role”]’)
.setValue(’-ios class chain’, ‘**/XCUIElementTypePickerWheel[value == "Other Role"]’)

As a workaround, try .sendKeys or .setValue to the ROLE field instead of the PickerWheel element… then click ‘Done’.

Hi @Hristovski , I Tried setting .setValue or .sendKeys to the ROLE field as you said but its not working I’m getting error as NoSuchElementError
An element could not be located on the page using the given search parameters.