Monitor Element Removal as a Page Change

I’m monitoring a webpage for a button. When the page updates, the button is removed and replaced with a different button. Distill detects this as a “Selection Empty” error instead of a page change, so I don’t receive a notification because it’s categorized as an error rather than a change.

Is there a way to configure Distill so that when the selected element disappears and changes, it is treated as a change and triggers a notification?

@a001liu This behavior occurs because the monitor is configured to track a specific element. When that element disappears completely, Distill treats it as a Selection Empty error because it can no longer find the selected element on the page.

That’s why we generally recommend either:

  • Selecting a more stable parent element that remains present even when the button changes.

  • Selecting a broader element that includes both the current button and the replacement button, so the monitor can detect the content change rather than running into a Selection Empty error.

Would you be able to share:

  • The website URL.

  • A screenshot of the section you’re trying to monitor.

We’ll review the page structure and suggest the best selector or monitoring approach so that the button change can be detected as a change rather than an error.

another simple solution is to include one more static element in the selection like the page’s title.

Hi, thank you for the response. I was trying to track a website where a “coming soon” icon would be replaced with an “add to cart” button. Usually, tracking a change from, “out of stock” to “add to cart” works, but for some reason, the change from “coming soon” was logged an error rather than a change. The three share one icon on the webpage. Unfortunately, the release has passed so I won’t be able to share an image.

@a001liu Thanks for the additional context.

That makes sense. If the selected “coming soon” element was removed completely when the page changed to “add to cart,” Distill would treat it as a Selection Empty error because the exact selected element no longer exists on the page.

For future monitors like this, the best approach is to include a nearby static element in the selection, such as the product title, or product name that remains on the page before and after the button changes.

If you need any help choosing the right selectors for a page in the future, feel free to reach out to us. We’d be happy to review the page and help you pick the most reliable selector for your use case.