CssSelector indentify particular web element on web page as Xpath performs and CssSelector is used to find element’s location on web page then call element during test script execution.
CssSelectors can be used with categories:-
– ID, Class and Name can be used as simple CssSelectors.
– Relationship with selectors can be used as Combinator Selectors process.
– Attribute and Attribute values bases elements can be used as Attribute Selectors.
And some other processes are also there.
Create CssSelector:- We used to combined by “id” with this example
Process :- Visit on page then inspect element there
>> HTML Tag is “Input” >> ID Attribute is “s”
Now combined them and check with test script
Note: This is an example and it can be created with some other ways also, so keep learning and practicing.