[Selenium] The most commonly used CSSSelector
2015-04-23 14:43
183 查看
CSSSelector | Example | Description |
element.element | div.dropdown | Select all <div> elements whose class=“dropdown” |
element#element | div#new-input | Select all <div> elements whose id =“new-input” |
element element | div p | Select all <p> elements who are under <div> element |
element>element | div>p | Select all <p> elements whose father is <div> element |
[attribute] | div[rowid] | Select all <div> elements who has attribute rowid |
[attribute=value] | input[value='OK'] | Select all <input> elements whose attribute value is ‘OK’ |
[attribute*=value] | a[src*=‘abc’] | Select all <a> elements whose attribute src contains ‘abc’ |
:nth-child(n) | p:nth-child(2) | Select all <p> elements who is the second child of its father |
eg 2: div#fileUpDiv input[value='OK']
相关文章推荐
- [Selenium] The commonly used operation of element
- [Selenium] The commonly used validation method
- Some of the most commonly used libraries for application development
- 【Selenium专题】元素定位之CssSelector
- python+selenium元素定位之 css selector 和 classname的区别
- The function used most in matlab
- 【Selenium专题】元素定位之CssSelector
- Selenium-Css Selector使用方法
- Selenium - CSS Selector
- Selenium_WebDriver登录模拟鼠标移动切换窗口等操作练习(cssSelector初练手)_Java
- The Most Widely Used Java Libraries
- The Most Widely Used Java Libraries
- 模拟浏览器自动化测试工具Selenium之四cssSelector元素定位开发篇
- The Most Widely Used Java Libraries
- Selenium - CSS Selector
- selenium+python find_element_by_css_selector方法使用
- Git The most commonly used git commands are
- selenium -- cssSelector
- CssSelector之selenium元素定位
- Selenium - CSS Selector