How to: find element by partial text of content-description

Hi,
I’m trying to find element by his content-description but only partial from his text value.
example: content-description = “abc bla bla bla” I need to find by the ‘abc’

function.VerifyElementExist(“xpath”, “//*[@content-desc=‘abc’]”);
This is how I’m usually find element, but now it’s not work.

Any help?

Thanks!

use .textContains(“test”)’

What do you mean use textContains?
I need to give xpath as parameter

try this:

driver.findElement(MobileBy.AndroidUIAutomator("new UiSelector().descriptionContains(\""+text+"\"));"));