4 ms·
I like the pre-gen approach! Curious how it responds to JS that changes how components are rendered at run-time.
by boriskurikhin 6mo ago
I like the pre-gen approach! Curious how it responds to JS that changes how components are rendered at run-time.
- muchael 6mo agoThere are a couple ways to handle JS components rendered at runtime: - Libretto prefers network requests over DOM interaction when possible, so this will circumvent a lot of complex JS rendering issues - When you do need the DOM, playwright can handle a lot of the complexity out of the box: playwright will re-query the live DOM at action time and automatically wait for elements to populate. Libretto is also set up to pick selectors like data-testid, aria-label, role, id over class names or positional stuff that's likely to be dynamic. - At the end of the day the files still live as code so you could always just throw a browser agent at it to handle a part of a workflow if nothing else works