Relative Content

Tag Archive for web-scrapingcypress

Handling unavailable price element with another element

So, I’ve made this web scraping script for Cypress. It goes to a shop website and scrapes the listed products (product titles and prices). Namely, in the case of certain products, there is no price shown (class name: .sc-dqia0p-3), but instead, there is a message saying that the product is unavailable. In the case of the website I’m testing, the element saying that the product is not available looks like this: