Checking for out of stock products was not working great.
If the CSS or xPath selector was not working, it would think the product was out of stock – i.e. a false positive.
So – to fix this, I think I should alter the admin area to provide some ‘out of stock’ text to search for near the product price, or maybe a CSS class to search for or some xPath to search for to identify the out of stock element.
Additionally, 404 HTTP status codes should set products for that link to out of stock.