Search code examples
androidadbpython-tesseract

Android adb find and click button


I am developing a shell script to test a website using ADB and I am trying to click a button, but the button is not always in the same coordinates.

How can I locate coordinates of the button by the text and then click it?

I am reaching the website with the default browser.

Thanks.


Solution

  • Accomplished using OpenCV

    What I did was to take a screenshot of the button and then using that image to locate the button itself in the screen.

    Thanks.