splinter
splinter copied to clipboard
Equivalent of jquery closest()?
I'm trying to figure out a way to get the nearest ancestor that matches a certain class of an element, which in jQuery you'd do with closest() http://api.jquery.com/closest/ but I don't see anything in the API (I'm using phantomjs) that lets me do that. Haven't had any luck putting together an xpath expression.
Closing, since this isn't a splinter question.
General xpath questions are better answered on sites like StackOverflow.