How do you find the right XPath for an element in an application?
Implement find_xpath(root, target_id). The input is a DOM-like tree represented by maps with tag, attributes, and children fields. Return //*[@id='target_id'] when exactly one element has the requested ID; otherwise return the absolute XPath of the first matching element, using one-based positions among siblings with the same tag. Return an empty string when no element matches.
def find_xpath(root, target_id):