
Writing an Element Clicker with Python and Selenium That Takes ID, CSS Selector, or XPath
When unit testing using Python and Selenium, it’s usually easiest to click a button with an element’s ID, but I’ve found a more flexible solution that doesn’t require multiple different function calls to be best. To that end, here’s a method I’ve written that one can use to click a ( more… )