Skip to content

Commit 8a83853

Browse files
authored
Merge branch 'trunk' into java_print
2 parents 9f7a034 + b63da32 commit 8a83853

File tree

12 files changed

+114
-24
lines changed

12 files changed

+114
-24
lines changed

.github/workflows/js-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ jobs:
8282
if: matrix.release == 'stable'
8383
uses: actions/setup-node@v4
8484
with:
85-
node-version: '18.x'
85+
node-version: '22.x'
8686
- name: Setup Node Nightly
8787
if: matrix.release == 'nightly'
8888
uses: actions/setup-node@v4
8989
with:
90-
node-version: '18.x'
90+
node-version: '22.x'
9191
registry-url: 'https://npm.pkg.github.com'
9292
- name: Use Nightly package.json in Ubuntu/macOS
9393
if: matrix.release == 'nightly' && matrix.os != 'windows'

examples/java/src/test/java/dev/selenium/drivers/HttpClientTest.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,30 @@ public void remoteWebDriverIgnoreSSL() throws Exception {
7070
driver.quit();
7171
}
7272

73+
@Test
74+
public void remoteWebDriverWithEmbedAuthUrl() throws Exception {
75+
ClientConfig clientConfig = ClientConfig.defaultConfig()
76+
.withRetries()
77+
.sslContext(createSSLContextWithCA(Path.of("src/test/resources/tls.crt").toAbsolutePath().toString()))
78+
.connectionTimeout(Duration.ofSeconds(300))
79+
.readTimeout(Duration.ofSeconds(3600))
80+
.version(HTTP_1_1.toString());
81+
ChromeOptions options = new ChromeOptions();
82+
options.setEnableDownloads(true);
83+
driver = RemoteWebDriver.builder()
84+
.oneOf(options)
85+
.address(embedAuthToUrl(gridUrl, "admin", "myStrongPassword"))
86+
.config(clientConfig)
87+
.build();
88+
driver.quit();
89+
}
90+
91+
private URL embedAuthToUrl(URL url, String username, String password) throws Exception {
92+
String userInfo = username + ":" + password;
93+
String urlWithAuth = url.getProtocol() + "://" + userInfo + "@" + url.getHost() + ":" + url.getPort() + url.getPath();
94+
return new URL(urlWithAuth);
95+
}
96+
7397
public static SSLContext createSSLContextWithCA(String caCertPath) throws Exception {
7498
FileInputStream fis = new FileInputStream(caCertPath);
7599
CertificateFactory cf = CertificateFactory.getInstance("X.509");

examples/kotlin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<kotlin.version>2.0.21</kotlin.version>
1313

1414
<slf4j.version>2.0.16</slf4j.version>
15-
<logback.version>1.5.14</logback.version>
15+
<logback.version>1.5.16</logback.version>
1616

1717
<junit5.version>5.11.4</junit5.version>
1818
<wdm.version>5.2.3</wdm.version>

examples/ruby/Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ GEM
44
ast (2.4.2)
55
base64 (0.2.0)
66
diff-lcs (1.5.1)
7-
json (2.9.0)
7+
json (2.9.1)
88
language_server-protocol (3.17.0.3)
99
logger (1.6.1)
1010
parallel (1.26.3)
@@ -14,7 +14,7 @@ GEM
1414
racc (1.8.1)
1515
rainbow (3.1.1)
1616
rake (13.2.1)
17-
regexp_parser (2.9.3)
17+
regexp_parser (2.10.0)
1818
rexml (3.3.9)
1919
rspec (3.13.0)
2020
rspec-core (~> 3.13.0)
@@ -29,7 +29,7 @@ GEM
2929
diff-lcs (>= 1.2.0, < 2.0)
3030
rspec-support (~> 3.13.0)
3131
rspec-support (3.13.0)
32-
rubocop (1.69.2)
32+
rubocop (1.70.0)
3333
json (~> 2.3)
3434
language_server-protocol (>= 3.17.0)
3535
parallel (~> 1.10)
@@ -39,7 +39,7 @@ GEM
3939
rubocop-ast (>= 1.36.2, < 2.0)
4040
ruby-progressbar (~> 1.7)
4141
unicode-display_width (>= 2.4.0, < 4.0)
42-
rubocop-ast (1.36.2)
42+
rubocop-ast (1.37.0)
4343
parser (>= 3.3.1.0)
4444
rubocop-rspec (3.3.0)
4545
rubocop (~> 1.61)

netlify.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ publish = "website_and_docs/public"
33
command = "chmod +x build-site.sh && ./build-site.sh"
44

55
[context.production.environment]
6-
NODE_VERSION = "18.14.1"
6+
NODE_VERSION = "22.13.0"
77
HUGO_VERSION = "0.125.4"
88
GO_VERSION = "1.20.1"
99
HUGO_ENV = "production"
@@ -12,14 +12,14 @@ HUGO_ENV = "production"
1212
command = "chmod +x build-site.sh && ./build-site.sh"
1313

1414
[context.deploy-preview.environment]
15-
NODE_VERSION = "18.14.1"
15+
NODE_VERSION = "22.13.0"
1616
HUGO_VERSION = "0.125.4"
1717
GO_VERSION = "1.20.1"
1818

1919
[context.branch-deploy]
2020
command = "chmod +x build-site.sh && ./build-site.sh"
2121

2222
[context.branch-deploy.environment]
23-
NODE_VERSION = "18.14.1"
23+
NODE_VERSION = "22.13.0"
2424
HUGO_VERSION = "0.125.4"
2525
GO_VERSION = "1.20.1"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ aliases: [
77
]
88
---
99

10-
Because Selenium cannot interact with the file upload dialog, it provides a way
11-
to upload files without opening the dialog. If the element is an `input` element with type `file`,
12-
you can use the send keys method to send the full path to the file that will be uploaded.
10+
由于 Selenium 不能与文件上传对话框交互,因此它提供了一种无需打开对话框即可上传文件的方法。
11+
如果该元素是一个类型为 `file``input` 元素,则可以使用
12+
send keys 方法发送将要上传文件的完整路径。
1313

1414
{{< tabpane text=true >}}
1515
{{< tab header="Java" >}}

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,19 @@ This exception occurs when the WebDriver is unable to create a new session for t
163163
- On macOS, go to **System Settings > Privacy & Security**, and allow the driver to run if blocked.
164164
- Verify the driver binary is executable (`chmod +x /path/to/driver` on Linux/macOS).
165165

166+
## ElementNotInteractableException
167+
168+
This exception occurs when Selenium tries to interact with an element that is not interactable in its current state.
169+
170+
### Likely Cause
171+
172+
1. **Unsupported Operation**: Performing an action, like `sendKeys`, on an element that doesn’t support it (e.g., `<form>` or `<label>`).
173+
2. **Multiple Elements Matching Locator**: The locator targets a non-interactable element, such as a `<td>` tag, instead of the intended `<input>` field.
174+
3. **Hidden Elements**: The element is present in the DOM but not visible on the page due to CSS, the `hidden` attribute, or being outside the visible viewport.
175+
176+
### Possible Solutions
177+
178+
1. Use actions appropriate for the element type (e.g., use `sendKeys` with `<input>` fields only).
179+
2. Ensure locators uniquely identify the intended element to avoid incorrect matches.
180+
3. Check if the element is visible on the page before interacting with it. Use scrolling to bring the element into view, if required.
181+
4. Use explicit waits to ensure the element is interactable before performing actions.

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,21 @@ This exception occurs when the WebDriver is unable to create a new session for t
157157

158158
- Ensure the WebDriver version matches the browser version. For Chrome, check the browser version at `chrome://settings/help` and download the matching driver from [ChromeDriver Downloads](https://chromedriver.chromium.org/downloads).
159159
- On macOS, go to **System Settings > Privacy & Security**, and allow the driver to run if blocked.
160-
- Verify the driver binary is executable (`chmod +x /path/to/driver` on Linux/macOS).
160+
- Verify the driver binary is executable (`chmod +x /path/to/driver` on Linux/macOS).
161+
162+
## ElementNotInteractableException
163+
164+
This exception occurs when Selenium tries to interact with an element that is not interactable in its current state.
165+
166+
### Likely Cause
167+
168+
1. **Unsupported Operation**: Performing an action, like `sendKeys`, on an element that doesn’t support it (e.g., `<form>` or `<label>`).
169+
2. **Multiple Elements Matching Locator**: The locator targets a non-interactable element, such as a `<td>` tag, instead of the intended `<input>` field.
170+
3. **Hidden Elements**: The element is present in the DOM but not visible on the page due to CSS, the `hidden` attribute, or being outside the visible viewport.
171+
172+
### Possible Solutions
173+
174+
1. Use actions appropriate for the element type (e.g., use `sendKeys` with `<input>` fields only).
175+
2. Ensure locators uniquely identify the intended element to avoid incorrect matches.
176+
3. Check if the element is visible on the page before interacting with it. Use scrolling to bring the element into view, if required.
177+
4. Use explicit waits to ensure the element is interactable before performing actions.

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,19 @@ This exception occurs when the WebDriver is unable to create a new session for t
159159
- On macOS, go to **System Settings > Privacy & Security**, and allow the driver to run if blocked.
160160
- Verify the driver binary is executable (`chmod +x /path/to/driver` on Linux/macOS).
161161

162+
## ElementNotInteractableException
163+
164+
This exception occurs when Selenium tries to interact with an element that is not interactable in its current state.
165+
166+
### Likely Cause
167+
168+
1. **Unsupported Operation**: Performing an action, like `sendKeys`, on an element that doesn’t support it (e.g., `<form>` or `<label>`).
169+
2. **Multiple Elements Matching Locator**: The locator targets a non-interactable element, such as a `<td>` tag, instead of the intended `<input>` field.
170+
3. **Hidden Elements**: The element is present in the DOM but not visible on the page due to CSS, the `hidden` attribute, or being outside the visible viewport.
171+
172+
### Possible Solutions
173+
174+
1. Use actions appropriate for the element type (e.g., use `sendKeys` with `<input>` fields only).
175+
2. Ensure locators uniquely identify the intended element to avoid incorrect matches.
176+
3. Check if the element is visible on the page before interacting with it. Use scrolling to bring the element into view, if required.
177+
4. Use explicit waits to ensure the element is interactable before performing actions.

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,20 @@ Actions class with `Actions.moveToElement(element)`.
161161
- 确保 WebDriver 版本与浏览器版本匹配。对于 Chrome,请在浏览器中访问 `chrome://settings/help` 检查浏览器版本,并从 [ChromeDriver 下载](https://chromedriver.chromium.org/downloads)页面下载匹配的驱动程序。
162162
- 在 macOS 上,转到 **系统设置 > 隐私与安全性**,并允许驱动程序运行(如果被阻止)。
163163
- 验证驱动程序二进制文件是否可执行(在 Linux/macOS 上运行 `chmod +x /path/to/driver`)。
164+
165+
## ElementNotInteractableException
166+
167+
当 Selenium 尝试与当前状态下无法交互的元素进行交互时,会发生此异常。
168+
169+
### 可能的原因
170+
171+
1. **不支持的操作**:尝试对不支持操作的元素执行操作,例如对 `<form>``<label>` 使用 `sendKeys`
172+
2. **多个元素匹配定位器**:定位器匹配到非可交互的元素,例如 `<td>` 标签,而不是目标的 `<input>` 字段。
173+
3. **隐藏的元素**:元素存在于 DOM 中,但由于 CSS、`hidden` 属性或元素超出可见视口范围而不可见。
174+
175+
### 可能的解决方案
176+
177+
1. 根据元素类型使用适当的操作(例如,仅对 `<input>` 字段使用 `sendKeys`)。
178+
2. 确保定位器唯一标识目标元素,以避免错误匹配。
179+
3. 在与元素交互之前,检查其是否在页面上可见。如果需要,将元素滚动到视图中。
180+
4. 使用显式等待以确保元素在执行操作前可交互。

website_and_docs/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website_and_docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"license": "Apache-2.0",
1111
"dependencies": {
1212
"autoprefixer": "^10.4.20",
13-
"postcss": "^8.4.49",
13+
"postcss": "^8.5.1",
1414
"postcss-cli": "^11.0.0"
1515
}
1616
}

0 commit comments

Comments
 (0)