JavaScript DSL to generate XPaths for matching HTML elements