Selenium学习笔记21_CSS Selector

来源:互联网 发布:ih5 知乎 编辑:程序博客网 时间:2024/04/30 11:51

翻译自: 英文原文链接

The following table summarizes the Selector syntax:

模式 含义 描述 CSS Level * any element universal selector 2 E an element of type E Type selector 1 E[foo] an E element with a “foo” attribute Attribute selector 2 E[foo=”bar”] an E element whose “foo” attribute value is equal to “bar” Attribute selector 2 E[foo~=”bar” an E element whose “foo” attribute value is a list of whitespace-separated values, one of which is equal to “bar” Attribute selector 2 E[foo^=”bar”] an E element whose “foo” attribute starts with “bar” Attribute selector 2 E[foo$=”bar”] an E element whose “foo” attribute ends with “bar” Attribute selector 3 E[foo*=”bar”] an E element whose “foo” attribute value contains the substring “bar” Attribute selector 3 E[foo =”en”] 匹配所有att属性具有多个连字号分隔(hyphen-separated)的值、其中一个值以“val”开头的E元素,主要用于lang属性,比如“en”、“en-us”、“en-gb”等等 Attribute selector E:root an E element, root of the document Structural pseudo-classes 3 E:nth-child(n) an E element, the n-th child of its parent Structural pseudo-classes 3 E:nth-last-child(n) an E element, the n-th child of its parent, counting from the last one Structural pseudo-classes 3
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 毕节住房公积金查询 邯郸市住房公积金管理中心 渭南市住房公积金管理中心 连云港住房公积金 临沂住房公积金查询个人账户 南充住房公积金 住房公积金密码 运城住房公积金查询 住房公积金查询电话 住房公积金热线 昆明市住房公积金管理中心 乌鲁木齐住房公积金查询 玉林市住房公积金管理中心 南宁住房公积金网 宜宾市住房公积金管理中心 重庆住房公积金 银川住房公积金查询个人账户 洛阳住房公积金查询 住房公积金卡 东莞住房公积金查询 南京住房公积金管理中心 成都住房公积金 广西住房公积金查询 广西区直住房公积金查询入口 哈尔滨住房公积金管理中心 武汉住房公积金查询个人账户 重庆市住房公积金管理中心 渭南住房公积金查询 咸阳市住房公积金管理中心 宁德住房公积金查询 苏州住房公积金管理中心 太原住房公积金 萍乡市住房公积金个人查询 深圳住房公积金查询余额 长春市住房公积金网 潍坊市住房公积金管理中心 阜阳市住房公积金查询 赣州住房公积金 太原住房公积金查询个人账户 郑州市住房公积金查询 杭州住房公积金管理中心