Allow only one behavior selection
The UI and API currently allows selecting multiple built-in behaviors or custom behaviors. The crawler actually only will run autoclick, autoscroll, OR a custom behavior. The UI should reflect the exclusion options.
If there are existing workflows with both autoscroll and autoclick enabled, autoscroll should be unchecked in favor of autoclick, which is opt-in.
This could probably use a little whiteboarding, as there are a few complexities. Just off of the top of my head, as examples:
- In a crawl with a scope that covers multiple pages and/or websites, we may want custom behaviors to run on a page if they match but autoclick to run if a custom behavior doesn't match
- If someone develops a custom behavior for a site where we have a built-in site specific behavior (such as Facebook or Tiktok), I'm also not sure which would take precedence at this point
I think not all of this complexity is introduced by adding custom behaviors, but it certainly highlights the need to figure out a design solution and effectively communicate to users what they can expect.
Yeah, the issue is that the crawler only will run autoclick, autoscroll, OR a custom behavior per page, but different pages could have different rules. Autoclick and Autoscroll can both run on the same page, but its sort of not recommended, can result in unexpected results - though perhaps can be improved. The custom behavior only runs if it matches the specific regex.
It's great as it is. But the guide for users could explain it better. We have situations where we need two custom behaviours + autoclick + autoscroll in the same crawl config. The important thing to know is how to scope it by using isMatch(). We also add our own version of autoscroll in our custom behaviors to have control. It would be even better if we could run multiple custom behaviors on same page, or somehow merge/include behaviors.