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:

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

Leave a Reply

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

You are commenting using your 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

Anastasia Writes

politics, engineering, parenting, relevant things over coffee.

One Software Tester

Trying To Make Sense Of The World, One Test At A Time

the morning paper

an interesting/influential/important paper from the world of CS every weekday morning, as selected by Adrian Colyer

RoboSim (Robot Simulator)

Visualize and Simulate the Robotics concepts such as Localization, Path Planning, P.I.D Controller


open notebook

a happy knockout mouse.

my journey into computer science

Perl 6 Advent Calendar

Something cool about Perl 6 every day


Inspire and spread the power of collaboration

Niraj Bhatt - Architect's Blog

Ruminations on .NET, Architecture & Design

Pete Zybrick

Bell Labs to Big Data

Seek Nuance

Python, technology, Seattle, careers, life, et cetera...


New Era of Test Automation

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



Thoughts related to software development

%d bloggers like this: