Friday, April 9, 2010

IE:Internet Explorer Developer Toolbar: What is IE?

Microsoft has an extension for Internet Explorer (link does not work with Firefox) that is a great addition to any tester's toolkit and is a great help when scripting web pages using Watir. This works on the DOM in the same manner that Watir does. You can explore the DOM, find elements by clicking on them and more. It's a highly recommended tool to use while writing Watir scripts.
The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:
  • Explore and modify the document object model (DOM) of a Web page.
  • Locate and select specific elements on a Web page through a variety of techniques.
  • View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.
  • Outline tables, table cells, images, or selected tags.
  • Display image dimensions, file sizes, path information, and alternate (ALT) text.
  • Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
  • Find the style rules used to set specific style values on an element.
  • View the formatted and syntax colored source of HTML and CSS.
  • Style Tracer: Right mouse click on a style value for an element and select Style Tracer to find the style rule that is effecting that value.
  • View Source: View the formatted and syntax colored source of the original page, currently rendered page, element or element with the styles that are effecting it.
To use this extension, in IE6 you can turn it on through the View Menu > Explorer Bar > IE DOM Explorer. In IE7, it's under the Tools icon > Toolbars > Explorer Bar > IE DOM Explorer.
Navigate to Google Search, and you should see something like the following.

In this case you can see the name attribute of the field to use in your scripts. Watir can use different attributes of a tag to manipulate that object, so it is important to know what they are. In some cases the attributes are not explicit in the tag such as the text attributes.

No comments:

Post a Comment