📜  xpath vs css 选择器 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:37.944000             🧑  作者: Mango

代码示例1
- We can create custom locators with both of them

- CSS Selector:
 - Works only one way. We can only go from
   parent to child using CSS Selector.
 - CssSelector is technically faster than XPATH.

- XPATH:
 - Works both ways. We can go both from parent to child,
   and child to parent using XPATH.
 - We can work with displayed TEXTS.