Documentation

Element click selector

Element click selector works similarly to Element selector. It's main purpose also is element selection that could be given as parent elements to its child selectors. The only difference is that Element click selector can interact with the web page by clicking on buttons.

Note! when selecting clickable elements you should select them by moving the mouse over the element and pressing "S". This kind of selection will avoid events triggered by the button.

Configuration options

  • selector - CSS selector for the wrapper elements that will be used as parent elements for child selectors.
  • click selector - CSS selector for the buttons that need to be clicked to load more elements.
  • click type - type of how the selector knows when there will be no new elements and clicking should stop.
  • click element uniqueness - type of how selector knows which buttons are already clicked.
  • multiple - multiple records are being extracted (almost always should be checked). Multiple option for child selectors usually should not be checked.
  • delay - delay before element selection and delay between clicking. This should usually be specified because the data won't be loaded immediately from the server. More than 2000 ms might be a good choice if you you don't want to lose data because the server didn't respond fast enough.
  • Discard initial elements - the selector will not return the elements that were available before clicking for the first time. This might be useful for duplicate removal.

Click type

Click Once

Click Once type will click on the buttons only once. If a new button appears that can be selected it will be also clicked.

Click More

Click More type makes the selector click on given buttons multiple times until there are no new elements appearing. A new element is considered an element that has unique text content.

Click element uniqueness

When using Click Once only unique buttons will be clicked. When using Click More this helps to ignore buttons that don't generate more elements.

  • Unique Text - buttons with identical text content are considered equal

  • Unique HTML+Text - buttons with identical HTML and text content are considered equal

  • Unique HTML - buttons with identical HTML and stripped text content are considered equal

  • Unique CSS Selector - buttons with identical CSS Selector are considered equal

    Discard initial elements

  • Never discard - scrapes data before and after click action

  • Discard when click element exists - discards the initial set of data that is scraped before the click selector initiates the click action

  • Always discard - always discards the initial set of data (Not recommended, as only available to accommodate sitemaps created pre-introduction of Discard when click element exists option)

Use cases

Item variations clicks

Iterate through item variations (size, colour, material, etc.) by selecting all clickable variation elements (e.g., swatches, buttons, or dropdown items). This allows the scraper to click each variation one by one, triggering any dynamic content updates (like price or availability) tied to that option.

When to select the Discard when click element exists option

The Discard when click element exists option is picked when, for example, product pages, of an e-commerce website, that are being scraped have an almost identical structure, with the only differentiator being the presence of a variation option (size, color, quantity, etc.) that has to be iterated through in the product page.

Due to the fact that the scraper will collect data before and after the click, by not having this option selected scraping a page with multiple variations available, the scraper will extract information before initiating the click and during the clicking process, resulting in duplicate or unusable row of data.

Related videos


Was this page helpful?