Skip to content

Commit 6bfbc33

Browse files
authored
Merge branch 'trunk' into update-nightly-version
2 parents eceb3b6 + 4c308a6 commit 6bfbc33

21 files changed

+135
-66
lines changed

examples/javascript/test/interactions/windows.spec.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,34 @@ describe('Interactions - Windows', function () {
8585
const windowsAfterClose = await driver.getAllWindowHandles();
8686
assert.strictEqual(windowsAfterClose.length, 2);
8787
});
88+
89+
it('Should be able to getWindow Size', async function () {
90+
await driver.get('https://www.selenium.dev/selenium/web/');
91+
92+
// Access each dimension individually
93+
const { width, height } = await driver.manage().window().getRect();
94+
95+
// Or store the dimensions and query them later
96+
const rect = await driver.manage().window().getRect();
97+
const windowWidth = rect.width;
98+
const windowHeight = rect.height;
99+
100+
assert.ok(windowWidth>0);
101+
assert.ok(windowHeight>0);
102+
});
103+
104+
it('Should be able to getWindow position', async function () {
105+
await driver.get('https://www.selenium.dev/selenium/web/');
106+
107+
// Access each dimension individually
108+
const { x, y } = await driver.manage().window().getRect();
109+
110+
// Or store the dimensions and query them later
111+
const rect = await driver.manage().window().getRect();
112+
const x1 = rect.x;
113+
const y1 = rect.y;
114+
115+
assert.ok(x1>=0);
116+
assert.ok(y1>=0);
117+
});
88118
});

website_and_docs/content/documentation/grid/advanced_features/endpoints.en.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ For every Node, the status includes information regarding Node availability, ses
1919
cURL GET 'http://localhost:4444/status'
2020
```
2121

22+
### Delete session
23+
24+
Deleting the session terminates the WebDriver session, quits the driver and removes it from the active sessions map.
25+
Any request using the removed session-id or reusing the driver instance will throw an error.
26+
27+
```shell
28+
cURL --request DELETE 'http://localhost:4444/session/<session-id>'
29+
```
30+
31+
### Which URL should I use?
32+
2233
In the Standalone mode, the Grid URL is the Standalone server address.
2334

2435
In the Hub-Node mode, the Grid URL is the Hub server address.

website_and_docs/content/documentation/grid/advanced_features/endpoints.ja.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ Grid ステータスは Grid の現在の状態を提供します。 登録さ
1919
cURL GET 'http://localhost:4444/status'
2020
```
2121

22+
### セッションの削除
23+
24+
セッションを削除すると、WebDriver セッションが終了し、ドライバがアクティブなセッションマップから削除されます。
25+
削除されたセッション ID を使用するリクエストや、ドライバのインスタンスを再利用しようとすると、エラーとなります。
26+
27+
```shell
28+
cURL --request DELETE 'http://localhost:4444/session/<session-id>'
29+
```
30+
31+
### Which URL should I use?
32+
2233
スタンドアロンモードでは、Grid URL は スタンドアロンサーバーのアドレスになります。
2334

2435
ハブ&ノードモードでは、Grid URL は ハブのアドレスになります。

website_and_docs/content/documentation/grid/advanced_features/endpoints.pt-br.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ Para cada nó, o status inclui informações sobre a disponibilidade, sessões e
1919
cURL GET 'http://localhost:4444/status'
2020
```
2121

22+
### Deletar sessão
23+
24+
A exclusão da sessão encerra a sessão do WebDriver, fecha o driver e o remove do mapa de sessões ativas.
25+
Qualquer solicitação usando o id de sessão removido ou reutilizando a instância do driver gerará um erro.
26+
27+
```shell
28+
cURL --request DELETE 'http://localhost:4444/session/<session-id>'
29+
```
30+
31+
### Which URL should I use?
32+
2233
No modo Standalone, o URL da Grid é o endereço do servidor Standalone.
2334

2435
No modo Hub-Node, a URL da Grid é o endereço do servidor Hub.

website_and_docs/content/documentation/grid/advanced_features/endpoints.zh-cn.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ Grid状态提供Grid的当前状态.
2121
cURL GET 'http://localhost:4444/status'
2222
```
2323

24+
### 检查会话所有者
25+
26+
要检查会话是否属于某一节点, 请使用下面列出的cURL命令.
27+
28+
```shell
29+
cURL --request DELETE 'http://localhost:4444/session/<session-id>'
30+
```
31+
32+
### Which URL should I use?
33+
2434
在独立模式下, Grid URL是独立服务器的地址.
2535

2636
在集线器节点模式下, Grid URL是集线器服务器的地址.

website_and_docs/content/documentation/grid/configuration/cli_options.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ pull request updating this page.
237237
| `--service-host` | string | `localhost` | Host name where the service that supports WebDriver commands is running |
238238
| `--service-port` | int | `4723` | Port where the service that supports WebDriver commands is running |
239239
| `--service-status-endpoint` | string | `/status` | Optional, endpoint to query the WebDriver service status, an HTTP 200 response is expected |
240+
| `--service-protocol-version` | string | `HTTP/1.1` | Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status |
240241
| `--service-configuration` | string[] | `max-sessions=2 stereotype='{"browserName": "safari", "platformName": "iOS", "appium:platformVersion": "14.5"}}'` | Configuration for the service where calls will be relayed to. It is recommended to provide this type of configuration through a toml config file to improve readability. |
241242

242243
### Router

website_and_docs/content/documentation/grid/configuration/cli_options.ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ Grid の設定には、さまざまなセクションが用意されています
236236
| `--service-host` | string | `localhost` | WebDriver コマンドをサポートしてるサービスが稼働しているホスト名。 |
237237
| `--service-port` | int | `4723` | WebDriver コマンドをサポートしてるサービスが稼働しているポート番号。 |
238238
| `--service-status-endpoint` | string | `/status` | WebDriver サービスの状態を問い合わせるエンドポイント、オプショナルです。HTTP 200 レスポンスが期待されます。 |
239+
| `--service-protocol-version` | string | `HTTP/1.1` | Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status |
239240
| `--service-configuration` | string[] | `max-sessions=2 stereotype='{"browserName": "safari", "platformName": "iOS", "appium:platformVersion": "14.5"}}'` | 呼び出しの中継先となるサービスの設定。可読性向上のため、TOML ファイルで設定することを推奨します。 |
240241

241242
### Router

website_and_docs/content/documentation/grid/configuration/cli_options.pt-br.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ e esteja à vontade para nos enviar um pull request com alterações a esta pág
240240
| `--service-host` | string | `localhost` | Host name where the service that supports WebDriver commands is running |
241241
| `--service-port` | int | `4723` | Port where the service that supports WebDriver commands is running |
242242
| `--service-status-endpoint` | string | `/status` | Optional, endpoint to query the WebDriver service status, an HTTP 200 response is expected |
243+
| `--service-protocol-version` | string | `HTTP/1.1` | Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status |
243244
| `--service-configuration` | string[] | `max-sessions=2 stereotype='{"browserName": "safari", "platformName": "iOS", "appium:platformVersion": "14.5"}}'` | Configuration for the service where calls will be relayed to. It is recommended to provide this type of configuration through a toml config file to improve readability. |
244245

245246
### Router

website_and_docs/content/documentation/grid/configuration/cli_options.zh-cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ pull request updating this page.
246246
| `--service-host` | string | `localhost` | Host name where the service that supports WebDriver commands is running |
247247
| `--service-port` | int | `4723` | Port where the service that supports WebDriver commands is running |
248248
| `--service-status-endpoint` | string | `/status` | Optional, endpoint to query the WebDriver service status, an HTTP 200 response is expected |
249+
| `--service-protocol-version` | string | `HTTP/1.1` | Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status |
249250
| `--service-configuration` | string[] | `max-sessions=2 stereotype='{"browserName": "safari", "platformName": "iOS", "appium:platformVersion": "14.5"}}'` | Configuration for the service where calls will be relayed to. It is recommended to provide this type of configuration through a toml config file to improve readability. |
250251

251252
### Router

website_and_docs/content/documentation/grid/configuration/toml_options.en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ detect-drivers = false
134134
# Default Appium/Cloud server endpoint
135135
url = "http://localhost:4723/wd/hub"
136136
status-endpoint = "/status"
137+
# Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status (e.g. HTTP/1.1, HTTP/2)
138+
protocol-version = "HTTP/1.1"
137139
# Stereotypes supported by the service. The initial number is "max-sessions", and will allocate
138140
# that many test slots to that particular configuration
139141
configs = [

website_and_docs/content/documentation/grid/configuration/toml_options.ja.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ detect-drivers = false
131131
# Default Appium/Cloud server endpoint
132132
url = "http://localhost:4723/wd/hub"
133133
status-endpoint = "/status"
134+
# Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status (e.g. HTTP/1.1, HTTP/2)
135+
protocol-version = "HTTP/1.1"
134136
# Stereotypes supported by the service. The initial number is "max-sessions", and will allocate
135137
# that many test slots to that particular configuration
136138
configs = [

website_and_docs/content/documentation/grid/configuration/toml_options.pt-br.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ detect-drivers = false
143143
# Default Appium/Cloud server endpoint
144144
url = "http://localhost:4723/wd/hub"
145145
status-endpoint = "/status"
146+
# Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status (e.g. HTTP/1.1, HTTP/2)
147+
protocol-version = "HTTP/1.1"
146148
# Stereotypes supported by the service. The initial number is "max-sessions", and will allocate
147149
# that many test slots to that particular configuration
148150
configs = [

website_and_docs/content/documentation/grid/configuration/toml_options.zh-cn.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ detect-drivers = false
149149
# Default Appium/Cloud server endpoint
150150
url = "http://localhost:4723/wd/hub"
151151
status-endpoint = "/status"
152+
# Optional, enforce a specific protocol version in HttpClient when communicating with the endpoint service status (e.g. HTTP/1.1, HTTP/2)
153+
protocol-version = "HTTP/1.1"
152154
# Stereotypes supported by the service. The initial number is "max-sessions", and will allocate
153155
# that many test slots to that particular configuration
154156
configs = [

website_and_docs/content/documentation/webdriver/interactions/windows.en.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,13 @@ size = driver.manage.window.size
515515
width1 = size.width
516516
height1 = size.height
517517
{{< /tab >}}
518-
{{< tab header="JavaScript" >}}
519-
// Access each dimension individually
520-
const { width, height } = await driver.manage().window().getRect();
518+
{{< tab header="JavaScript" text=true >}}
519+
Access each dimension individually
520+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L93" >}}
521521

522-
// Or store the dimensions and query them later
523-
const rect = await driver.manage().window().getRect();
524-
const width1 = rect.width;
525-
const height1 = rect.height;
526-
{{< /tab >}}
522+
(or) store the dimensions and query them later
523+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L96-L98" >}}
524+
{{< /tab >}}
527525
{{< tab header="Kotlin" >}}
528526
//Access each dimension individually
529527
val width = driver.manage().window().size.width
@@ -595,15 +593,13 @@ rect = driver.manage.window.rect
595593
x1 = rect.x
596594
y1 = rect.y
597595
{{< /tab >}}
598-
{{< tab header="JavaScript" >}}
599-
// Access each dimension individually
600-
const { x, y } = await driver.manage().window().getRect();
596+
{{< tab header="JavaScript" text=true >}}
597+
Access each dimension individually
598+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L108" >}}
601599

602-
// Or store the dimensions and query them later
603-
const rect = await driver.manage().window().getRect();
604-
const x1 = rect.x;
605-
const y1 = rect.y;
606-
{{< /tab >}}
600+
(or) store the dimensions and query them later
601+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L111-L113" >}}
602+
{{< /tab >}}
607603
{{< tab header="Kotlin" >}}
608604
// Access each dimension individually
609605
val x = driver.manage().window().position.x

website_and_docs/content/documentation/webdriver/interactions/windows.ja.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -487,15 +487,13 @@ size = driver.manage.window.size
487487
width1 = size.width
488488
height1 = size.height
489489
{{< /tab >}}
490-
{{< tab header="JavaScript" >}}
491-
// Access each dimension individually
492-
const { width, height } = await driver.manage().window().getRect();
490+
{{< tab header="JavaScript" text=true >}}
491+
Access each dimension individually
492+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L93" >}}
493493

494-
// Or store the dimensions and query them later
495-
const rect = await driver.manage().window().getRect();
496-
const width1 = rect.width;
497-
const height1 = rect.height;
498-
{{< /tab >}}
494+
(or) store the dimensions and query them later
495+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L96-L98" >}}
496+
{{< /tab >}}
499497
{{< tab header="Kotlin" >}}
500498
//Access each dimension individually
501499
val width = driver.manage().window().size.width
@@ -566,15 +564,13 @@ rect = driver.manage.window.rect
566564
x1 = rect.x
567565
y1 = rect.y
568566
{{< /tab >}}
569-
{{< tab header="JavaScript" >}}
570-
// Access each dimension individually
571-
const { x, y } = await driver.manage().window().getRect();
567+
{{< tab header="JavaScript" text=true >}}
568+
Access each dimension individually
569+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L108" >}}
572570

573-
// Or store the dimensions and query them later
574-
const rect = await driver.manage().window().getRect();
575-
const x1 = rect.x;
576-
const y1 = rect.y;
577-
{{< /tab >}}
571+
(or) store the dimensions and query them later
572+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L111-L113" >}}
573+
{{< /tab >}}
578574
{{< tab header="Kotlin" >}}
579575
// Access each dimension individually
580576
val x = driver.manage().window().position.x

website_and_docs/content/documentation/webdriver/interactions/windows.pt-br.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,13 @@ size = driver.manage.window.size
503503
width1 = size.width
504504
height1 = size.height
505505
{{< /tab >}}
506-
{{< tab header="JavaScript" >}}
507-
// Access each dimension individually
508-
const { width, height } = await driver.manage().window().getRect();
506+
{{< tab header="JavaScript" text=true >}}
507+
Access each dimension individually
508+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L93" >}}
509509

510-
// Or store the dimensions and query them later
511-
const rect = await driver.manage().window().getRect();
512-
const width1 = rect.width;
513-
const height1 = rect.height;
514-
{{< /tab >}}
510+
(or) store the dimensions and query them later
511+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L96-L98" >}}
512+
{{< /tab >}}
515513
{{< tab header="Kotlin" >}}
516514
//Access each dimension individually
517515
val width = driver.manage().window().size.width
@@ -581,15 +579,13 @@ rect = driver.manage.window.rect
581579
x1 = rect.x
582580
y1 = rect.y
583581
{{< /tab >}}
584-
{{< tab header="JavaScript" >}}
585-
// Access each dimension individually
586-
const { x, y } = await driver.manage().window().getRect();
582+
{{< tab header="JavaScript" text=true >}}
583+
Access each dimension individually
584+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L108" >}}
587585

588-
// Or store the dimensions and query them later
589-
const rect = await driver.manage().window().getRect();
590-
const x1 = rect.x;
591-
const y1 = rect.y;
592-
{{< /tab >}}
586+
(or) store the dimensions and query them later
587+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L111-L113" >}}
588+
{{< /tab >}}
593589
{{< tab header="Kotlin" >}}
594590
// Access each dimension individually
595591
val x = driver.manage().window().position.x

website_and_docs/content/documentation/webdriver/interactions/windows.zh-cn.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -468,14 +468,12 @@ size = driver.manage.window.size
468468
width1 = size.width
469469
height1 = size.height
470470
{{< /tab >}}
471-
{{< tab header="JavaScript" >}}
472-
// 分别获取每个尺寸
473-
const {width, height} = await driver.manage().window().getRect();
471+
{{< tab header="JavaScript" text=true >}}
472+
分别获取每个尺寸
473+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L93" >}}
474474

475-
// 或者存储尺寸并在以后查询它们
476-
const rect = await driver.manage().window().getRect();
477-
const width1 = rect.width;
478-
const height1 = rect.height;
475+
或者存储尺寸并在以后查询它们
476+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L96-L98" >}}
479477
{{< /tab >}}
480478
{{< tab header="Kotlin" >}}
481479
// 分别获取每个尺寸
@@ -546,14 +544,12 @@ rect = driver.manage.window.rect
546544
x1 = rect.x
547545
y1 = rect.y
548546
{{< /tab >}}
549-
{{< tab header="JavaScript" >}}
550-
// 分别获取每个尺寸
551-
const {x, y} = await driver.manage().window().getRect();
547+
{{< tab header="JavaScript" text=true >}}
548+
分别获取每个尺寸
549+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L108" >}}
552550

553-
// 或者存储尺寸并在以后查询它们
554-
const rect = await driver.manage().window().getRect();
555-
const x1 = rect.x;
556-
const y1 = rect.y;
551+
或者存储尺寸并在以后查询它们
552+
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L111-L113" >}}
557553
{{< /tab >}}
558554
{{< tab header="Kotlin" >}}
559555
// 分别获取每个尺寸

website_and_docs/content/documentation/webdriver/waits.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ _Explicit waits_ are loops added to the code that poll the application
9292
for a specific condition to evaluate as true before it exits the loop and
9393
continues to the next command in the code. If the condition is not met before a designated timeout value,
9494
the code will give a timeout error. Since there are many ways for the application not to be in the desired state,
95-
so explicit waits are a great choice to specify the exact condition to wait for
95+
explicit waits are a great choice to specify the exact condition to wait for
9696
in each place it is needed.
9797
Another nice feature is that, by default, the Selenium Wait class automatically waits for the designated element to exist.
9898

website_and_docs/content/documentation/webdriver/waits.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ _Explicit waits_ are loops added to the code that poll the application
9292
for a specific condition to evaluate as true before it exits the loop and
9393
continues to the next command in the code. If the condition is not met before a designated timeout value,
9494
the code will give a timeout error. Since there are many ways for the application not to be in the desired state,
95-
so explicit waits are a great choice to specify the exact condition to wait for
95+
explicit waits are a great choice to specify the exact condition to wait for
9696
in each place it is needed.
9797
Another nice feature is that, by default, the Selenium Wait class automatically waits for the designated element to exist.
9898

website_and_docs/content/documentation/webdriver/waits.pt-br.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ _Explicit waits_ are loops added to the code that poll the application
9292
for a specific condition to evaluate as true before it exits the loop and
9393
continues to the next command in the code. If the condition is not met before a designated timeout value,
9494
the code will give a timeout error. Since there are many ways for the application not to be in the desired state,
95-
so explicit waits are a great choice to specify the exact condition to wait for
95+
explicit waits are a great choice to specify the exact condition to wait for
9696
in each place it is needed.
9797
Another nice feature is that, by default, the Selenium Wait class automatically waits for the designated element to exist.
9898

website_and_docs/content/documentation/webdriver/waits.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ _Explicit waits_ are loops added to the code that poll the application
9292
for a specific condition to evaluate as true before it exits the loop and
9393
continues to the next command in the code. If the condition is not met before a designated timeout value,
9494
the code will give a timeout error. Since there are many ways for the application not to be in the desired state,
95-
so explicit waits are a great choice to specify the exact condition to wait for
95+
explicit waits are a great choice to specify the exact condition to wait for
9696
in each place it is needed.
9797
Another nice feature is that, by default, the Selenium Wait class automatically waits for the designated element to exist.
9898

0 commit comments

Comments
 (0)