Upload Document issue

How to automate upload document if id and classname is same and name locators is not working please me ASAP`

`

You have TextView … why not perform click based on the text

hi @saikrishna321 text view is not working can you please suggest me how to use text view .

please suggest me syntax of textview

What is that you have tried ?

1.WebElement cp = (appium.findElement(By.name(Lib.getProperty(CONFIG_PATH, “DLC”))));
cp.click();

2.appium.findElement(By.xpath("//android.widget.LinearLayout[@index=‘0’]")).click();

3.some more i have tried like by xpath with text .

so please suggest me

DLC=Take picture of DRIVING LICENSE COPY
AP=(ebroker.com.ebroker:id/layout_address_proof)[1]
AP1=ebroker.com.ebroker:id/layout_address_proof

Please refer this blog on how to write XPath

By.name is deprecated and won’t work for Native Applications

tq @saikrishna321 and FUR i have uploaded screen shot

HI @saikrishna321 i am able to handle 1 upload button but i have 2 how can i click on second upload please help me out i shared my script for 1st upload button with screen shot

scripts

appium.findElement(By.xpath("//android.widget.LinearLayout[ @clickable=‘true’]")).click();

upload 3

try something like this : //*[contains(@text, “DRIVING”)]

hi @saikrishna321 i have tried the above xpath but it is not wokring i have used below mention xpath

appium.findElement(By.xpath("//*[contains(@text, ‘Take picture of ADDRESS PROOF’)]")).click();

The above issue is resolved i have used to select multiple doc as use loactor as below mention
Listupload=appium.findElements(By.className(“android.widget.LinearLayout”));
upload.get(1).click();

use index according to index option