Skip to content

Instantly share code, notes, and snippets.

@michaelkarrer81
Last active April 20, 2023 17:36
Show Gist options
  • Save michaelkarrer81/586bbc65e308d31e60a8d065ab74f508 to your computer and use it in GitHub Desktop.
Save michaelkarrer81/586bbc65e308d31e60a8d065ab74f508 to your computer and use it in GitHub Desktop.
[XPATH Examples] #xpath #odoo
<!-- Attribute contains string(s) -->
<xpath expr="//div[contains(@class, 'oe_right oe_button_box')]" position="inside">...</xpath>
<!-- Last element -->
<xpath expr="//ul/li[last()]" position="after">...</xpath>
<xpath expr="//ul/li[@class='nav'][last()]" position="after">...</xpath>
<!-- First element -->
<xpath expr="//ul[1]]" position="after">...</xpath>
<!-- Last li of first ul -->
<xpath expr="//ul[1]/li[last()]]" position="after">...</xpath>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment