Geb + Groovy select custom element with a dash in the attribute name

geb, groovy, ui-automation

Solution

You can just use the CSS selector for a custom attribute for this:

$("li[data-title='Something']")

Problem

I am trying to use the Geb jQuery selector on the following element: ``` <li data-title="Something"><'li> ``` I have tried the following: ``` //1 $("li", "data-title": "Something") //2 $("li", data-title: "Something") ``` But neither work. Is this possible?

Original source