Selenium Easter Egg-css selector How to use

Source: Internet
Author: User

Ext.: http://www.imdsx.cn/index.php/2017/07/27/css1/

What is CSS Selector?

CSS selector positioning is actually the HTML CSS selector tag positioning

Tools

Css Selector's exercises suggest that you install Firefox, download plugins, Firefinder or Firebug and firepath combinations.

How to use CSS Selector

1, CSS selector support ID, class positioning and HTML in the same position as Css

# Number table ID positioning label with ID is more concise # I1 the label that represents class positioning has an ID is more concise. C1 class positioning also provides multiple class positioning through continuous. To narrow the range. C1.c2.c3

2, CSS selector support tag positioning no eggs

Same as CSS support tag Selector, but there is no use, a page repeat the label too many positioning methods: directly enter the label name

3. CSS selector supports arbitrary attribute positioning

The property is positioned in the same way as the CSS, with a direct bracket, plus a property on it [name='N1']

4, the property positioning is not enough to meet our positioning needs, CSS selector provides a combination of tag attributes positioning

Same as CSS positioning the same as our Tag property selector input[name='N1') when used in combination with ID, class, it is easier to write the class INPUT.C1 ID input#i1

5. CSS Selector provides multi-attribute combination filtering

CSS Selector Multi-attribute combination selection filter without and only need multiple [] connections can select[name='city' [size='4'] [multiple="multiple"]

6, the same CSS selector also support hierarchical relationship positioning

Different Css selector with XPath by > to differentiate the hierarchy of select>option[value='3']

7. Css Selector Fuzzy Matching

^= matches the element attribute with what start input[value^=" login "] $= match attribute with what end input[value$= " Record " ]   *= Match property contains what value input [value*="  ]

We are not more sharp than the Dragon Slayer sword?

After all, leaning on the Sword and Dragon Slayer DAO is not common people can use, if the Dragon knife and leaning sword waving not up, there is a simple artifact, Selenium Builder.

Selenium Easter Egg-css selector How to use

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.