Thursday, March 5th, 2009

SelectorGadget: Selector Bookmarklet

Category: Debugging

>Having trouble working out a selector to grab that DOM element? Take heart, Blake Edwards and Kit Sunde pointed us to something that may help you out: SelectorGadget.

SelectorGadget is an open source bookmarklet that makes CSS selector generation and discovery on complicated sites a breeze.

With SelectorGadget, you just click on the DOM element(s), and presto, you get a selector. Try it out! Nice work from Andrew Cantino and Kyle Maxwell.

Related Content:

Posted by Ben Galbraith at 7:00 am
9 Comments

++++-
4.2 rating from 32 votes

9 Comments »

Comments feed TrackBack URI

Does anybody know such a thing that creates XPath expressions instead of CSS selectors? That seems much more reliably to me.

Comment by yunosh — March 5, 2009

um… Blake Edwards gave us Inspector Clouseau, not Inspector Gadget.

Comment by JamesCurran — March 5, 2009

“um… Blake Edwards gave us Inspector Clouseau, not Inspector Gadget.”

For comedy, I give you a “10.”

Comment by Nosredna — March 5, 2009

I agree with yunosh. The functionality of this bookmarklet can be expanded to include xpath expressions.

Comment by picardo — March 5, 2009

Thanks for the feedback, guys. I’ll look into adding XPath. Let me know if you find sites it doesn’t work well on, there are tons of edge cases.

-Andrew

Comment by cantino — March 6, 2009

This seems like a great way to get selectors for jQuery. I’m curious about you xpath guys–why xpath rather than css?

Comment by Nosredna — March 6, 2009

XPath is useful for, among other things, greasemonkey scripts and microsummaries.

Comment by kswartz — March 6, 2009

I’ve added XPath generation to the development version of SelectorGadget: http://selectorgadget.com

Comment by cantino — March 10, 2009

Awesome, nice work!

Comment by yunosh — March 12, 2009

Leave a comment

You must be logged in to post a comment.