Session 23 Locators CSS Selector

Types

Syntax

tag id

tag#id

tag class

tag.classname

tag attribute

tag[attribute="value"]

tag class attribute

tag.classname[attribute="value"]

Note that tag is optional here.

Tag name and classname is used for locating multiple elements / group of web elements.

Note : in classname, if there are multiple classnames, then take the first classname till first space only. remove other classnames.