3

I'm trying to automate sending a picture on snapchat, using python and uiautomator dump. When I have taken the picture and am ready to click the send button, the uiautomator dump returns the button with coords 0,0 0,0. All the 'wrapping'/'surrounding' nodes return 0,0 0,0 as well. Is there a way to fix this/approach this differently?


                                <node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.snapchat.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][0,0]">
                                    <node index="0" text="" resource-id="com.snapchat.android:id/send_btn_layout" class="android.view.ViewGroup" package="com.snapchat.android" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][0,0]">
                                        <node index="0" text="Send To" resource-id="com.snapchat.android:id/send_btn_hint_label" class="android.widget.TextView" package="com.snapchat.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][0,0]" />
                                        <node index="1" text="" resource-id="com.snapchat.android:id/send_btn" class="android.widget.ImageButton" package="com.snapchat.android" content-desc="Send" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][0,0]" />
                                    </node>
                                </node>

  • Used uiautomator dump to extract the coordinates of the button to make the script click it automatically.
  • Expecting actual coordinates instead of 0,0 0,0.

Thanks in advance.

0 Answers0