Skip to content

Commit e85b0ad

Browse files
committed
updatres
1 parent 413afa1 commit e85b0ad

File tree

2 files changed

+137
-2
lines changed

2 files changed

+137
-2
lines changed

docs/04-dsl.mdx

+59-1
Original file line numberDiff line numberDiff line change
@@ -3726,7 +3726,6 @@ All Gherkin steps that match the DSL expressions described here are readily exec
37263726
<details id="i-maximize-the-window">
37273727
<summary class="dsl">
37283728

3729-
<b>Deprecated since v4.5.0</b> : Use <code>I resize the window to width &lt;w&gt; and height &lt;h&gt;</code> to set desired size instead.
37303729
```gherkin
37313730
I <maximize|maximise> the window
37323731
```
@@ -3809,6 +3808,65 @@ All Gherkin steps that match the DSL expressions described here are readily exec
38093808
</div>
38103809
</details>
38113810

3811+
<details id="i-set-the-window-position-to-x-and-y">
3812+
<summary class="dsl">
3813+
3814+
```gherkin
3815+
I set the window position to x <x> and y <y>
3816+
```
3817+
<p>Positions the currently active browser window to the given co-ordinates.</p>
3818+
</summary>
3819+
<p>Where</p>
3820+
<ul>
3821+
<li><code>&lt;x&gt;</code> is the x co-ordinate</li>
3822+
<li><code>&lt;y&gt;</code> is the y co-ordinate</li>
3823+
</ul>
3824+
<p>Example</p>
3825+
3826+
```gherkin {2}
3827+
When I navigate to "https://todomvc.com/examples/react/dist"
3828+
And I set the window position to x 40 and y 20
3829+
```
3830+
3831+
<div class="grid-3">
3832+
<div><Link to="#i-set-the-window-position-to-x-and-y">Link</Link></div>
3833+
<div align="center"></div>
3834+
<div align="right">Since <Link to="https://github.com/gwen-interpreter/gwen-web/releases/tag/v4.7.0">v4.7.0</Link></div>
3835+
</div>
3836+
</details>
3837+
3838+
<details id="i-send-keys">
3839+
<summary class="dsl">
3840+
3841+
```gherkin
3842+
I send "<keys>"
3843+
```
3844+
<p>Sends a sequence of keys to the browser (for emulating keyboard shortcuts).</p>
3845+
</summary>
3846+
<p>Where</p>
3847+
<ul>
3848+
<li>
3849+
<code>&lt;keys&gt;</code> is a <code>,</code> or <code>+</code> (since <Link to="https://github.com/gwen-interpreter/gwen-web/releases/tag/v2.53.0">v2.53.0</Link>) separated list of keys to send.
3850+
<ul>
3851+
<li>Keys can be single keyboard characters or any supported <Link to="https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/Keys.html">key constants</Link></li>
3852+
<li><i>Note:</i> Keys behave differently on different platforms</li>
3853+
</ul>
3854+
</li>
3855+
</ul>
3856+
<p>Example</p>
3857+
3858+
```gherkin {2}
3859+
When I navigate to "https://google.com"
3860+
And I send "COMMAND+t"
3861+
```
3862+
3863+
<div class="grid-3">
3864+
<div><Link to="#i-send-keys">Link</Link></div>
3865+
<div align="center"></div>
3866+
<div align="right">Since <Link to="https://github.com/gwen-interpreter/gwen-web/releases/tag/v2.44.0">v2.44.0</Link></div>
3867+
</div>
3868+
</details>
3869+
38123870
#### Frame actions
38133871

38143872
<details id="i-switch-to-the-default-content">

docs/06-settings.mdx

+78-1
Original file line numberDiff line numberDiff line change
@@ -4253,6 +4253,84 @@ Default value (empty to pick up Gwen default format: html)
42534253
</div>
42544254
</details>
42554255

4256+
<details id="gwen-web-browser-position">
4257+
<summary class="setting">
4258+
4259+
```properties
4260+
gwen.web.browser.position
4261+
```
4262+
<p>Sets the position of the main browser window.</p>
4263+
</summary>
4264+
<p>Supported values</p>
4265+
<ul>
4266+
<li>
4267+
String of format <code>&lt;x&gt;,&lt;y&gt;</code>, where:
4268+
<ul>
4269+
<li><code>&lt;x&gt;</code> is a positive integer denoting the x co-ordinate</li>
4270+
<li><code>&lt;y&gt;</code> is a positive integer denoting the y co-ordinate</li>
4271+
</ul>
4272+
</li>
4273+
</ul>
4274+
<Tabs
4275+
groupId="settings"
4276+
defaultValue="conf"
4277+
values={[
4278+
{label: 'conf', value: 'conf'},
4279+
{label: 'json', value: 'json'},
4280+
{label: 'properties', value: 'properties'}
4281+
]}>
4282+
4283+
<TabItem value="conf">
4284+
4285+
Example
4286+
4287+
```json
4288+
gwen {
4289+
web {
4290+
browser {
4291+
size = "0,0"
4292+
}
4293+
}
4294+
}
4295+
```
4296+
4297+
</TabItem>
4298+
<TabItem value="json">
4299+
4300+
Example
4301+
4302+
```json
4303+
{
4304+
"gwen": {
4305+
"web": {
4306+
"browser": {
4307+
"size": "0,0"
4308+
}
4309+
}
4310+
}
4311+
}
4312+
```
4313+
4314+
</TabItem>
4315+
<TabItem value="properties">
4316+
4317+
Example
4318+
4319+
```properties
4320+
gwen.web.browser.size = 0,0
4321+
```
4322+
4323+
</TabItem>
4324+
4325+
</Tabs>
4326+
4327+
<div class="grid-3">
4328+
<div><Link to="#gwen-web-browser-position">Link</Link></div>
4329+
<div align="center"></div>
4330+
<div align="right">Since <Link to="https://github.com/gwen-interpreter/gwen-web/releases/tag/v4.7.0">v4.7.0</Link></div>
4331+
</div>
4332+
</details>
4333+
42564334
<details id="gwen-web-capabilities">
42574335
<summary class="setting">
42584336

@@ -4888,7 +4966,6 @@ Default value (empty to pick up Gwen default format: html)
48884966
<details id="gwen-web-maximize">
48894967
<summary class="setting">
48904968

4891-
<b>Deprecated since v4.5.0</b> : Use <code>gwen.web.browser.size</code> to set desired size instead.
48924969
```properties
48934970
gwen.web.maximize
48944971
```

0 commit comments

Comments
 (0)