Some wording of CSS selector selectors in automated testing

Source: Internet
Author: User

Common symbols:

#表示id

. Represents class

> represents child elements, hierarchy

A space also represents a child element, but is all descendant child elements, equivalent to the relative path in XPath

#input Select a node with ID input

. Volvo chooses the node of the class for Volvo

Div#radio>input Select all the input nodes under the DIV with ID radio

Div#radio input selects all descendants of the input node under the DIV with ID radio

Div#radio>input:nth-of-type (4) Select the 4th Input node under DIV with ID Radio

Div#radio>:nth-child (1) Select the 1th child node under the DIV with ID radio

Div#radio>input:nth-of-type (4) +label Select the Label node next to the 4th input node under the DIV with ID radio

Div#radio>input:nth-of-type (4) ~label selects all label nodes after the 4th input node under the DIV with ID radio

Input. Volvo[name= ' Identity ') Select Class as. The input node for Volvo and name identity

Input[name= ' identity '][type= ' Radio ']:nth-of-type (1) Select the 1th input node with name identity and type radio

input[name^= ' ident ') Select all input nodes with the name attribute starting with ident

input[name$= ' entity ' selects all input nodes of the name attribute ending with ' entity '

input[name*= ' Enti ') Select all input nodes that contain the Name property of ' Enti '

Div#radio>*:not (input) selects all child nodes that are not input in the child nodes of the DIV with ID radio

Input:not ([Type=radio]) Select all nodes in the input node that type is not radio

Some wording of CSS selector selectors in automated testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.