Our automated end-to-end tests for WordPress.com include searching for a domain and selecting a .com result from a screen that looks like this: We want our tests to be consistent, so even though we search for a different address each time, we want to select the ‘.com’ address result each time by clicking ‘Select’ next to that result. … Continue reading “The importance of testability, or how to avoid the nastiest xpath selector known to mankind”