UI-Element is an extension for the Selenium IDE and Remote Control that makes it possible to define a mapping between semantically meaningful names of elements on webpages and the elements themselves. The mapping is stored in a file using JavaScript Object Notation. The file may be shared by the IDE and driven tests running via the Selenium server.

UI-Element is what we saw as controls or elements in each page. It is simply know as object.

Repositories UI Element mapping is where the object references are stored. UI-Element Mapping is available in Selenium IDE as a user extension.

Primary goals for the usage of UI Elements:

1. Robust test cases which can take care of changes in application related to existing elements.
2. Provide a richer language for encoding locator logic.

UI Element and UI Map

UI element:

A mapping between a meaningful name for a page element, and the means to locate that page element’s DOM node. The page element is located via XPath. UI elements belong to pagesets.

UI map:

A collection of pagesets, which in turn contain UI elements. The UI map is the medium for translating between UI specifier strings, page elements, and UI elements.

Example of using UI Element:

Selenium.type(“ui=WordPress::UserName()”, “admin”);

Map Definitions File Syntax:

var map = new UIMap();

map.addPageset({

name: ‘aPageset’

, …

});

map.addElement(‘aPageset’, { … });

map.addElement(‘aPageset’, { … });

map.addPageset({

name: ‘anotherPageset’

, …

});

Steps to Add the UI Map file in to Selenium IDE:

1. This file has to be created as Javascript file with .js extension.
2. Open Selenium IDE.
3. Select Option —>Options.
4. Under Selenium Core Extensions (user extension.js), Browse the above created UIMap.js file and click OK.
5. Close and Open the Selenium IDE to get the UIMap file activated.

Now Try to record the your case you can find the changed element