Finding elements for Selenium

17 Nov

Finding element locators not always easy, particularly with AJAX and dynamic components. It appears there’s no one-size-fits-all tool that will find every element for you. Sometimes need to use combination of tools to find element.  When one tool doesn’t work, try another. Or use multiple to find the best matching locator for an element. For Firefox that includes:

Firebug
FirePath
Firefinder
XPather
XPath Checker
DOM Inspector

there may be others, but the list above is what I currently use. FirePath is my favorite among the list. Anyone have suggestions for tools not in that list? FirePath is my preferred tool in the set, followed by Firebug.

What about for other browsers? Suggestions?

For IE, at least IE8+, there’s built in developer toolbar but I find it rather very slow compared to Firefox extensions. I’d only use it as last resort. I think the dev toolbar addon for IE7 is better (or rather faster) but haven’t used it much to really say. For my IE needs, I’ve been using IE DebugBar instead.

For other browsers, I just use their native developer tools.

Update 2/18/2013:

Interestingly today, I came across a prime example of when one tool doesn’t work, try another that I mention in this blog post, see this Selenium user group discussion:

Element value different on screen and when inspected with Firebug

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Der Flounder

Seldom updated, occasionally insightful.

The 4T - Trail, Tram, Trolley, Train

Exploring Portland with the 4T

Midnight Musings

Thoughts on making art

Automation Guide

The More You Learn The More You Play...!

The Performance Engineer

Code.Test.Tune.Optimize.

humblesoftwaredev

Thoughts related to software development

Yi Wang's Tech Notes

A blog ported from http://cxwangyi.blogspot.com

Appium Tutorial

Technical…..Practical…..Theoretically Interesting

LinuxMeerkat

I swear! Meerkats can do Linux

PacketsDropped

Requeuing the packets dropped in my memory.

Two cents of software value

Writing. Training. Consulting.

@akumar overflow

wisdom exceeding 140 chars.

Lazy Programmer's Shortcut

Java, J2EE, Spring, OOAD, DDD & LIFE! .......all in one :)

Testing Mobile Apps

www.SoftwareTestingStudio.com

Photofocus

education and inspiration for visual storytellers

No, Seriously...

Freeing up some mind cache!

Mike Taulty

I do some developer stuff for Microsoft UK

%d bloggers like this: