Skip to content

Commit b7cee65

Browse files
authored
Merge branch 'trunk' into elementNotVisibleException
2 parents c73bb9e + 18b7f8d commit b7cee65

File tree

6 files changed

+75
-8
lines changed

6 files changed

+75
-8
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright 2024 Software Freedom Conservancy (SFC)
190+
Copyright 2025 Software Freedom Conservancy (SFC)
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

examples/java/src/test/java/dev/selenium/interactions/PrintOptionsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import org.junit.jupiter.api.Test;
44
import org.openqa.selenium.print.PageMargin;
55
import org.openqa.selenium.print.PrintOptions;
6-
6+
import org.openqa.selenium.print.PageSize;
77
import dev.selenium.BaseChromeTest;
88

99
public class PrintOptionsTest extends BaseChromeTest {
@@ -31,8 +31,8 @@ public void TestSize()
3131
{
3232
driver.get("https://www.selenium.dev/");
3333
PrintOptions printOptions = new PrintOptions();
34-
printOptions.setScale(.50);
35-
double current_scale = printOptions.getScale();
34+
printOptions.setPageSize(new PageSize(27.94, 21.59)); // A4 size in cm
35+
double currentHeight = printOptions.getPageSize().getHeight(); // use getWidth() to retrieve width
3636
}
3737

3838
@Test

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,23 @@ like when the last tab/browser has closed (e.g. `driver.close()`)
146146
Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes
147147
of closed tabs/browsers. It could be that you are locating an element before you should/can.
148148

149+
## SessionNotCreatedException
150+
151+
This exception occurs when the WebDriver is unable to create a new session for the browser. This often happens due to version mismatches, system-level restrictions, or configuration issues.
152+
153+
### Likely Cause
154+
155+
- The browser version and WebDriver version are incompatible (e.g., ChromeDriver v113 with Chrome v115).
156+
- macOS privacy settings may block the WebDriver from running.
157+
- The WebDriver binary is missing, inaccessible, or lacks the necessary execution permissions (e.g., on Linux/macOS, the driver file may not be executable).
158+
159+
160+
### Possible Solutions
161+
162+
- 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).
163+
- On macOS, go to **System Settings > Privacy & Security**, and allow the driver to run if blocked.
164+
- Verify the driver binary is executable (`chmod +x /path/to/driver` on Linux/macOS).
165+
149166
## ElementNotVisibleException
150167

151168
This exception is thrown when the element you are trying to interact with _is_ present in the DOM, but is not visible.
@@ -160,4 +177,4 @@ This can occur in several situations:
160177

161178
This issue cannot always be resolved on the user's end, however when it can it is usually solved by the following:
162179
using an explicit wait, or interacting with the page in such a way to make the element visible
163-
(scrolling, clicking a button, etc.)
180+
(scrolling, clicking a button, etc.)

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
@@ -142,6 +142,23 @@ like when the last tab/browser has closed (e.g. `driver.close()`)
142142
Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed
143143
tabs/browsers. It could be that you are locating an element before you should/can.
144144

145+
## SessionNotCreatedException
146+
147+
This exception occurs when the WebDriver is unable to create a new session for the browser. This often happens due to version mismatches, system-level restrictions, or configuration issues.
148+
149+
### Likely Cause
150+
151+
- The browser version and WebDriver version are incompatible (e.g., ChromeDriver v113 with Chrome v115).
152+
- macOS privacy settings may block the WebDriver from running.
153+
- The WebDriver binary is missing, inaccessible, or lacks the necessary execution permissions (e.g., on Linux/macOS, the driver file may not be executable).
154+
155+
156+
### Possible Solutions
157+
158+
- 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).
159+
- 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).
161+
145162
## ElementNotVisibleException
146163

147164
This exception is thrown when the element you are trying to interact with _is_ present in the DOM, but is not visible.
@@ -156,4 +173,4 @@ This can occur in several situations:
156173

157174
This issue cannot always be resolved on the user's end, however when it can it is usually solved by the following:
158175
using an explicit wait, or interacting with the page in such a way to make the element visible
159-
(scrolling, clicking a button, etc.)
176+
(scrolling, clicking a button, etc.)

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,23 @@ This usually occurs when the session has been deleted (e.g. `driver.quit()`) or
142142

143143
Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed tabs/browsers. It could be that you are locating an element before you should/can.
144144

145+
## SessionNotCreatedException
146+
147+
This exception occurs when the WebDriver is unable to create a new session for the browser. This often happens due to version mismatches, system-level restrictions, or configuration issues.
148+
149+
### Likely Cause
150+
151+
- The browser version and WebDriver version are incompatible (e.g., ChromeDriver v113 with Chrome v115).
152+
- macOS privacy settings may block the WebDriver from running.
153+
- The WebDriver binary is missing, inaccessible, or lacks the necessary execution permissions (e.g., on Linux/macOS, the driver file may not be executable).
154+
155+
156+
### Possible Solutions
157+
158+
- 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).
159+
- 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).
161+
145162
## ElementNotVisibleException
146163

147164
This exception is thrown when the element you are trying to interact with _is_ present in the DOM, but is not visible.
@@ -156,4 +173,4 @@ This can occur in several situations:
156173

157174
This issue cannot always be resolved on the user's end, however when it can it is usually solved by the following:
158175
using an explicit wait, or interacting with the page in such a way to make the element visible
159-
(scrolling, clicking a button, etc.)
176+
(scrolling, clicking a button, etc.)

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,22 @@ Actions class with `Actions.moveToElement(element)`.
146146
### 可能的解决方案
147147
检查脚本中是否有 `driver.close()``driver.quit()` 的实例,以及其他可能导致标签页/浏览器关闭的原因。可能是您在应该/能够定位元素之前就尝试定位了该元素。
148148

149+
## SessionNotCreatedException
150+
151+
此异常发生在 WebDriver 无法为浏览器创建新会话时。通常由于版本不匹配、系统级限制或配置问题导致。
152+
153+
### 可能的原因
154+
155+
- 浏览器版本和 WebDriver 版本不兼容(例如 ChromeDriver v113 和 Chrome v115)。
156+
- macOS 隐私设置可能会阻止 WebDriver 运行。
157+
- WebDriver 二进制文件丢失、不可访问或没有执行权限。
158+
159+
### 可能的解决方案
160+
161+
- 确保 WebDriver 版本与浏览器版本匹配。对于 Chrome,请在浏览器中访问 `chrome://settings/help` 检查浏览器版本,并从 [ChromeDriver 下载](https://chromedriver.chromium.org/downloads)页面下载匹配的驱动程序。
162+
- 在 macOS 上,转到 **系统设置 > 隐私与安全性**,并允许驱动程序运行(如果被阻止)。
163+
- 验证驱动程序二进制文件是否可执行(在 Linux/macOS 上运行 `chmod +x /path/to/driver`)。
164+
149165
## ElementNotVisibleException
150166

151167
This exception is thrown when the element you are trying to interact with _is_ present in the DOM, but is not visible.
@@ -160,4 +176,4 @@ This can occur in several situations:
160176

161177
This issue cannot always be resolved on the user's end, however when it can it is usually solved by the following:
162178
using an explicit wait, or interacting with the page in such a way to make the element visible
163-
(scrolling, clicking a button, etc.)
179+
(scrolling, clicking a button, etc.)

0 commit comments

Comments
 (0)