Unable to Select Values from DropList

Hi All,

Environment: Appium Native mobile app for IOS v11.3 and java client 1.5.4.
Current screen has 2 dropDowns.
Dropdown A and Dropdown B : Dropdown B gets populated only on selection of Dropdpwn A selection.
I have selected Droplist A and clicked on dropDown B for values.Vlaues are displayed but appium inspector unable to capture values in droplist as its javascript values.

Please require solution on how to select value in Droplist B .As unable to inspect values in droplistB.

You must switch to the webview context

i have similar problem …@mykola why we need to change to webview if it is native app

In previous case it was native app with webView. If your app does not have webView you should not switch.

ya thanks but i couldnot select the value from drop down as it is not highlighting in appium inspector /studio…
Pls help…

share your pageSource + screen. without any info about your app - hardly we can help you.

Hi Aleksei,

I have reported to developer …about dropdown.He insisted that he used custom implementation dropdown feature not the native one for client reasons.
so he cannot change the implementation.

Here in the screenshot below Please look into hierarchy where i cannot find the elements of the dropdown options.
Please advise me on this issue
XCUIElementTypeTextField is visible on dropdown but unable to locate on options.

Custom implementations need custom solutions: https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/iPhoneAccessibility/Making_Application_Accessible/Making_Application_Accessible.html

mykola-mokhnach
From Appium testing point of view how the above link is useful ?
I am using appium with java.
Custom solution is mentioned in some developing code how can i extract and change to appium code.
Please help.
i couldnt get any hint from that link.

you run into common XCUITest problem when some elements are not visible. this happens when elements like button or cell contains many other fields. it is just an iOS ancient bug.
the only workaround works for me mentioned in -> LeftTabBarItem of XCUIElementTypeNavigationBar not found by Appium

iOS developer need add IDs to elements that not visible here and explicitly mention them e.g. in “init” or “viewDidLoad” function. thus later these elements will appear below (after all elements) BUT you can see them.

There is nothing you could do from your side. Only devs could make their custom controls accessible, so XCTest is able to interact with them properly. If they cannot/don’t want to then you are stuck :frowning:

One more thing There are some elements in the screen where i cannot locate exactly and unable to perform action over there .It will select whole xcuielementtypecell think if it is button.
Temporarily i am using tap by co-ordinates for clicking but i dont think it is a proper solution .
Any suggestions ?

quite often elements inside “button” or “cell” views are not accessible. it is just old XCTest bug which apple does not fix. only developer can help you either make elements inside accessible or re-write code to use other views.

PS same issue will meet developer also when he tries to automate same view with native XCTest framework with Xcode.