Check out accessibility trees and how they can provide better context to LLMs than HTML and regular selectors. A couple of hints: -page.accessibility.snapshot() -page.get_by_role()