Skip to content

Commit a0f79cd

Browse files
authored
Update finders.zh-cn as comment
update as comment SeleniumHQ#2 and SeleniumHQ#4 add `DOM子集` as transaction of `subset of DOM` change `CSS定位器` to `CSS选择器`
1 parent 6808488 commit a0f79cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website_and_docs/content/documentation/webdriver/elements/finders.zh-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ val vegetable: WebElement = driver.findElement(By.className("tomatoes"))
6161
{{< /tabpane >}}
6262

6363

64-
### 在部分DOM中查找元素
64+
### 在部分DOM(DOM子集)中查找元素
6565

6666
以上代码无法获取在样例第二个列表中的"tomato"元素。如果知道目标元素所属位置且希望获取指定范围里的元素而不是整个上下文中的第一个,可以进行部分搜索。
6767

@@ -108,7 +108,7 @@ val fruit = fruits.findElement(By.className("tomatoes"))
108108

109109
为了略微提高性能,我们可以使用 CSS 或 XPath 在单个命令中查找该元素。请查看在[最佳实践]({{< ref "/documentation/test_practices/encouraged" >}})中的[使用定位器的提示]({{< ref "/documentation/test_practices/encouraged/locators" >}})部分。
110110

111-
如下所示,我们通过CSS路径定位器查找元素
111+
如下所示,我们通过CSS选择器查找元素
112112

113113
{{< tabpane langEqualsHeader=true >}}
114114
{{< tab header="Java" >}}

0 commit comments

Comments
 (0)