Skip to main content

Web Technology: Criteria Table

tip

The following Web Criteria table is for Web technology.

No.Criteria FieldDescription
1X-PathXpath defines the hierarchy of the tags through which you can reach to a particular element. For example /html/body/div[1]/div/div[3]/div[2]/div/div[2]/div/div/div[2]/div[2]/div[1]/div[1]/div[1]/span/spanNote: Browser generated XPATH does not work well with SVG, PATH elements. One can create custom Xpath using browser generated xpath." we can provide samples
2IdId attribute of a web element can be best way to identify an element if it is present and is going to constant and unique. There are cases however when it is either absent or its value changes every time you access the application in the browser.
3NameName is another attribute of a web element which can be used to identify an element.
4Link TextIf a HTML page contains a hyperlink element <a href=www.google.com>Search On Google</a>, you can identify this href element by providing complete text ‘Search On Google’ as the Link value.
5Tag NameEvery HTML element has a tag associated with it. The element can be located using that tag name. For example, textbox has a tag <input>.
6Class NameClass name is the css class associated with an HTML element. If there is a div element <div class=’someclass’>MyDiv</div>, you can locate it by giving class name ‘someclass’.
7CSS SelectorThis criterion is useful when an HTML element has multiple associated css classes. Consider an HTML element <div class="btn primary-btn submit"></div>. To identify this div element you can use Css selector as “.btn.primary-btn.submit”