Skip to content

Commit f94a814

Browse files
authored
Merge branch 'trunk' into print-page-size-options
2 parents a1b98b2 + a62ef3d commit f94a814

File tree

3 files changed

+564
-42
lines changed

3 files changed

+564
-42
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ register_toolchains("@dotnet_toolchains//:all")
9393
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
9494
oci.pull(
9595
name = "java_image_base",
96-
digest = "sha256:161a1d97d592b3f1919801578c3a47c8e932071168a96267698f4b669c24c76d",
96+
digest = "sha256:1df9f3e6a2de0544dd04f1840aa811d334045c9126f9e93d8da45448061ad51e",
9797
image = "gcr.io/distroless/java17",
9898
)
9999
oci.pull(

py/selenium/webdriver/common/by.py

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,58 @@
2222

2323

2424
class By:
25-
"""Set of supported locator strategies."""
25+
"""Set of supported locator strategies.
26+
27+
ID:
28+
--
29+
Select the element by its ID.
30+
31+
>>> element = driver.find_element(By.ID, 'myElement')
32+
33+
XPATH:
34+
------
35+
Select the element via XPATH.
36+
- absolute path
37+
- relative path
38+
39+
>>> element = driver.find_element(By.XPATH, '//html/body/div')
40+
41+
LINK_TEXT:
42+
----------
43+
Select the link element having the exact text.
44+
45+
>>> element = driver.find_element(By.LINK_TEXT, 'myLink')
46+
47+
PARTIAL_LINK_TEXT:
48+
------------------
49+
Select the link element having the partial text.
50+
51+
>>> element = driver.find_element(By.PARTIAL_LINK_TEXT, 'my')
52+
53+
NAME:
54+
----
55+
Select the element by its name attribute.
56+
57+
>>> element = driver.find_element(By.NAME, 'myElement')
58+
59+
TAG_NAME:
60+
--------
61+
Select the element by its tag name.
62+
63+
>>> element = driver.find_element(By.TAG_NAME, 'div')
64+
65+
CLASS_NAME:
66+
----------
67+
Select the element by its class name.
68+
69+
>>> element = driver.find_element(By.CLASS_NAME, 'myElement')
70+
71+
CSS_SELECTOR:
72+
-------------
73+
Select the element by its CSS selector.
74+
75+
>>> element = driver.find_element(By.CSS_SELECTOR, 'div.myElement')
76+
"""
2677

2778
ID = "id"
2879
XPATH = "xpath"

0 commit comments

Comments
 (0)