Alertcat

Watch an element appear or disappear

Sometimes the change you want is not text but the presence of one element, such as a booking button or a new option in a list.

What you will build

If a selector matches nothing, the filtered text is empty. If it matches later, the text appears and Alertcat sees a change. That makes presence checks easy to build with a selector and trigger text.

  • The page URL.
  • A way to find the element, such as your browser's inspect tool.
  • Plain HTML: Alertcat fetches pages over plain HTTP. Pages that need JavaScript, a login form or clicks to show their content are not available yet.

Step by step

  1. Open the page in your browser, right-click the element and inspect it. Note its id, class or a stable attribute.
  2. Create a watch for the URL and open Filters & Triggers.
  3. Enter a CSS selector that matches only that element, for example `button.book-now`. Use XPath if CSS cannot express it.
  4. Check the watch preview. If the filter matches nothing, the page may add the element with JavaScript.
  5. For a select box, use a selector for its options to be told when a new option appears.
  6. Add a notification and save. You get an alert when the selector first matches, and another when it stops matching.

Tips from real setups

Prefer attributes that describe meaning, such as an id, a data attribute or an aria label, over generated class names like css-1x2y3z. Generated names change on every site build and silently break the watch.

Test the selector on the saved page source first. If the element is not in the raw HTML, Alertcat will not see it either.

Example filters

# CSS filter: a booking button
button.book-now

# CSS filter: all options in a drop-down
select#country option

# XPath: a link whose text says Apply
xpath://a[contains(normalize-space(.), 'Apply')]

# Disappearance: watch the same selector and use no trigger

Troubleshooting

  • Selector matches nothing: the element may be built by JavaScript, or the class is generated. Pick a stable attribute.
  • Selector matches too much: add a parent id to narrow it.
  • Alerts when the text of the button changes: use only an attribute with XPath, or ignore the text.
  • Check the filter on a copy in the CSS selector tester.

Frequently asked questions

Can I alert only on appearance?

Yes. Use trigger text that matches the element's label.

Is XPath supported?

Yes. Prefix with `xpath:`. See the XPath tester.

Does it work on SPA pages?

Not yet when content depends on JavaScript.

Related

Watch the pages that matter

Alertcat is in early access. Tell us what you want to watch and we will set up your team.

Request access