Your shopping cart is empty!
This is probably the most common method of locating elements and is the catch-all default when no recognized locator type is used. With this strategy, the first element with the id attribute value matching the location will be used. If no element has a matching id attribute, then the first element with a name attribute matching the location will be used.
For instance, your page source could have id and name attributes as follows:
name="username" type="text" />
name="password" type="password" />
name="continue" type="submit" value="Login" />
The following locator strategies would return the elements from the HTML snippet above indicated by line number:
Since the identifier type of locator is the default, the identifier= in the first three examples above is not necessary.