I'm trying to test a complicated JavaScript interface with Selenium (using the Python interface, and across multiple browsers). I have a number of buttons of the form: <div>My Button</div> I'd like to be able to search for buttons based on "My Button" (or non-case-sensitive, partial matches such as "my button" or "button"). I'm finding this amazingly difficult, to the extent to which I feel like I
![How do I find an element that contains specific text in Selenium WebDriver (Python)?](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)