Not able to identify element in andorid:widgetbutton in ViewGroup from different layout i.e Frame, Linear and Relative layout and it's not working


#1

<android.widget.FrameLayout>
<android.widget.LinearLayout>
<android.widget.FrameLayout>
<android.widget.FrameLayout>
<android.widget.RelativeLayout>
<android.view.ViewGroup>
<android.view.ViewGroup>
<android.view.ViewGroup>
<android.view.ViewGroup>
<android.view.ViewGroup>
<android.view.ViewGroup>
<android.widget.RelativeLayout>
<android.view.ViewGroup>
<android.widget.Button>

|Attribute | Value|
elementId : 6
index : 0
text :SKIP
class :android.widget.Button
checkable:false
checked :false
clickable :true
enabled :true
focusable : true
focused : false
scrollable :false
long-clickable : false
password :false
selected : false
bounds : [524,1308][700,1362]
resource-id :
instance : 0

I have tried different Xpath and name i.e…
driver.findElement(By.xpath("/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.widget.Button")).click();

driver.findElement(By.xpath("//android.widget.Button[@text=‘SKIP’]")).click();

driver.findElement(By.name(“SKIP”)).click();

WebElement abc = driver.findElement(By.xpath("/android.widget.Button[@bounds=’[524,1308][700,1362]’]"))

No one Xpath and name is working…