Unable to select locator with getText attribute

Appium is unable to identify EditText locators. Per appium inspector, I have xpath as <android.widget.EditText content-desc="Victory Capital User ID required , ">

The locator is visible also other non editText locators are getting selected. I seem to have issue only with editText locators on the page.

Appium is unable to identify this locator. Other locators on the page are working as expected. So this looks to be an issue with editText attribute in xpath.
el = await $(’//android.widget.EditText[@content-desc="Victory Capital User ID required , "]’);

  • Appium version (or git revision) that exhibits the issue: 1.22.3
  • Last Appium version that did not exhibit the issue (if applicable): N/A
  • Desktop OS/version used to run Appium: windows 10
  • Node.js version (unless using Appium.app|exe): 18.1.0
  • Npm or Yarn package manager: 8.8.0
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Bitbar cloud services
  • Appium CLI or Appium.app|exe: using VSC, appium desktop used to identify locators

error logs:

2022-09-04 13:37:24:864 - [WD Proxy] Got response with status 404: {“sessionId”:“039cdf80-efa9-4b8b-a118-209ef3a3163d”,“value”:{“error”:“no such element”,“message”:“An element could not be located on the page using the given search parameters”,“stacktrace”:"io.appium.uiautomator2.common.exceptions.ElementNotFoundException:

try using native locators -> How to get Android element by id that is set programmatically

Thanks. I did try below options but no luck. I am using webdriverIO
el = await $(’//android.widget.EditText[1]’);
el = await $("//android.widget.EditText[contains(@content-desc,'Victory Capital User ID required , ')]");
el = await $("//*[contains(@text(),‘Victory Capital User ID’)]");
el = await $(“id='Victory Capital User ID required , '”);

-> https://webdriver.io/docs/selectors/#android-uiautomator see example:

const selector = 'new UiSelector().text("Cancel").className("android.widget.Button")'
const button = await $(`android=${selector}`)
await button.click()

now replace selector to needed:

const selector = 'new UiSelector().descriptionContains("Victory Capital User ID required")'

Thanks for your help. was able to resolve this. Used - //*[contains(@text,“Victory Capital User ID”)]//parent::android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText