Card layouts are popular UI patterns for displaying grouped information. Learn how to extract data from cards, including their selection states and complex fields.
with VisionAgent() as agent: cards = agent.get("Extract all cards", response_schema=List[Card]) if not cards: # Check for empty state message empty_message = agent.get( "What does the empty state message say?", response_schema=str )
Pagination for Card Grids: Handle large collections
Copy
Ask AI
with VisionAgent() as agent: all_cards = [] page = 1 while True: page_cards = agent.get( "Extract visible cards on current page", response_schema=List[Card] ) all_cards.extend(page_cards) has_more = agent.get("Is there a 'Load More' button?", response_schema=bool) if has_more: agent.click("Load More") page += 1 else: break
Dynamic Card Loading: Handle lazy-loaded content
Copy
Ask AI
with VisionAgent() as agent: # Scroll to load more cards initial_count = agent.get("How many cards are visible?", response_schema=int) agent.scroll("down", 500) agent.wait(2) # Wait for loading new_count = agent.get("How many cards are visible?", response_schema=int) if new_count > initial_count: print(f"Loaded {new_count - initial_count} more cards")