Here is a syntax that i use usually when dealing with xpath selection:
xpath("//*[@content-desc=“foo” ]")
some extra syntaxes:
you can use some logic gate as OR AND
xpath("//*[@text=“foo” or @label=“foo” ]")
syntax using contains:
xpath("//*[contains(@text, “f”)]")