Hi, im currently working on a project (android native) that requires a dropdown to select a customer id type.
The dropdown items are according to the sourcecode:
public void setOptions(@NonNull List<SelectableOption<T>> options) {
this.options = options;
List<String> strOpts = options.stream()
.map(opt -> getContext().getString(opt.getStringResource()))
.collect(Collectors.toList());
autoCompleteTextView.setAdapter(new ArrayAdapter<>(getContext(), R.layout.dropdown_item, strOpts));
And the layout:
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=âhttp://schemas.android.com/apk/res/androidâ
android:id="@android:id/text1"
android:layout_width=âmatch_parentâ
android:layout_height=âwrap_contentâ
android:padding=â16dpâ
android:ellipsize=âendâ
android:maxLines=â1â
android:textAppearance="?attr/textAppearanceSubtitle1"
/>
The issue is that even with the id assigned (android:id/text1) i cant find it using appium via appium desktop or with code(python) or with android monitor/uiautomatorviewer
I have tried:
- driver.find_element_by_id(âandroid:id/text1â)
- driver.find_element_by_android_uiautomator(ânew UiScrollable(new UiSelector()).scrollIntoView(" + ânew UiSelector().text(â" + CUIL + ââ));"â)
- driver.find_element_by_android_uiautomator(ânew UiSelector().text("" + CUIL + ââ));â)
- xpath with //*[contains(@text, âCUILâ)]
Any ideas? Or there is anything that the dev team can change so it appears on the app source/hierarchy?
Thanks