'Robotframework - Appium Locating an Element (XPATH - NO IDENTIFICATORS)

I need help clicking on an Element in an Android App, here's the source of the page, I'm using Robot Framework with it's Appium Library.

<android.view.View index="0" package="com.zentity.android.redesign.rbcz.mobilbank.test" class="android.view.View" text="" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="fal
se" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,1458][1080,1626]" displayed="true" />

<android.view.View index="1" package="com.zentity.android.redesign.rbcz.mobilbank.test" class="android.view.View" text="" checkable="false" checked="false" clickable="true" enabled="false" focusable="false" focused="f
alse" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[24,1470][168,1614]" displayed="true">

<android.view.View index="0" package="com.zentity.android.redesign.rbcz.mobilbank.test" class="android.view.View" text="" content-desc="Internet activation" checkable="false" checked="false" clickable="false" enable
d="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[72,1518][120,1566]" displayed="true" />
                  </android.view.View>

<android.view.View index="2" package="com.zentity.android.redesign.rbcz.mobilbank.test" class="android.view.View" text="Internetové bankovnictví" checkable="false" checked="false" clickable="false" enabled="true" focu
sable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[192,1512][721,1572]" displayed="true" />
                </android.view.View>

button looks like this

Button look

Problem is that only clickable element is the first view with index "0".

I've tried following:

  1. Click Text 'Internetové bankovnictví' but it's clickable=false so it doesn't click, also tried the Tap Function in Appium Library by Robot Framework

  2. Click Element with absolute xpath xpath=//android.view.View[@index='1']/android.view.View[@index='0'] while android.view.View[@index='0'] is clickable, but it doesn't find the element with the xpath I set.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source