Selenium CSS Selector #3 – CSS Selector with Multiple Attributes

In this Selenium CSS selector tutorial we will learn how to write Selenium CSS selector using multiple attributes of the webelement.

You can write advanced CSS selectors using the mix of Tag, ID or CLASSNAME and other attributes of the webelement.

Syntax for CSS selector with multiple attributes:

tagName.classValue[AttributeName=’AttributeValue’]

tagName#idValue[AttributeName=’AttributeValue’]

Examples:

input.signup[type=’submit’][value=’Sign me up ‘]

input#submit_btn[type=’submit’][value=’Sign me up ‘]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.