I’ve been running a weekly locator challenge on my blog. I pick an element on a website, and ask everyone to create a locator using XPath or CSS Selector that will identify this element.
I’ve been particular mean this week, for 2 reasons:
We are looking at the worlds worst website. It is a website that will hurt your eyes.
I’ve not actually completed this weeks challenge. I’ve only found a solution that uses XPath. I’ve not yet solved it using CSS Selector.
Create a locator using XPath or CSS Selector that will identify the tip message. It must not include the index or position number. If another paragraph element were to be added to the page, then the locator should not need editing or updating:
If it helps, here is a screenshot of the elements in devtools. The grey element is the one we’re trying to identify.
Not really, these are websites which I don’t really have any control over. If it was a website I was actually testing, then mutation testing would be possible. Let’s face it, as testers there are probably many changes we’d recommend for this website.