I find the element with By.id, as the following code:
element = driver.findElement(AppiumBy.id(
"com.test:id/product_detail_nav_host"
));
But none of this lines can find the same element:
element = driver.findElement(AppiumBy.xpath(
"//*[id='com.test:id/product_detail_nav_host']"
));
element = driver.findElement(AppiumBy.xpath(
"//*[@id='com.test:id/product_detail_nav_host']"
));
element = driver.findElement(AppiumBy.xpath(
"//*[resource-id='com.test:id/product_detail_nav_host']"
));