'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.



Sources

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

Source: Stack Overflow

Solution Source