In this post, mostly we will be talking about relative xpath patterns (find elements based on some conditions).
Refer Absolute and Relative XPATH for xpath types.
Element with attribute(A) with value (V) :
[Any element on the DOM having attrbuteA with ValueV irrespective of the element type]
xpath: //*[@A = 'V']
CSS: [A = 'V']
Refer Absolute and Relative XPATH for xpath types.
Element with attribute(A) with value (V) :
[Any element on the DOM having attrbuteA with ValueV irrespective of the element type]
xpath: //*[@A = 'V']
CSS: [A = 'V']