Skip to content

Commit cf8b3d1

Browse files
committed
Add ShadowRoot annotation to support locating shadow root elements
1 parent a9df2a4 commit cf8b3d1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/04-dsl.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,10 @@ All Gherkin steps that match the DSL expressions described here are readily exec
682682

683683
#### Element locators
684684

685+
:::info Shadow DOM also supported
686+
Since [v4.8.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v4.8.0), you can use the `@ShadowRoot` annotation on any locator step to refer to a shadow root element.
687+
:::
688+
685689
<details id="element-can-be-located-by-selector-expression">
686690
<summary class="dsl">
687691

docs/05-annotations.mdx

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Use annotations in [meta](/docs/meta) and avoid them in features where possible.
3535
| [`@Parallel`](/docs/parallel#parallel-scenario-outline-examples) | Examples | [v3.69.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.69.0) | Executes expanded examples in outlines in parallel |
3636
| [`@Timeout`](/docs/locator-level-timeouts#timeout-annotations) | Step | [v3.73.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.73.0) | Specifies a timeout period on a [wait](/docs/dsl#sleeps-and-waits), [until/while](/docs/dsl#untilwhile), [for each](/docs/dsl#foreach), [assertion](/docs/dsl#assertions) or [locator](/docs/dsl#element-locators) DSL step. Examples: `@Timeout('10s')`, `@Timeout('2m30s')`, `@Timeout('2m')` |
3737
| [`@Delay`](/docs/locator-level-timeouts#delay-annotation) | Step | [v3.73.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.73.0) | Specifies a delay interval on a [wait](/docs/dsl#sleeps-and-waits), [until/while](/docs/dsl#untilwhile) DSL step. Examples: `@Delay('2s')`, `@Delay('1s500ms')`, `@Delay('1m')` |
38-
| [`@Results`](/docs/reports/csv#results-annotation) | Feature<br/>Rule<br/>Scenario<br/>StepDef<br/>Scenario Outline<br/>Examples | [v3.77.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.77.0) | Generates CSV results for a gherkin node |
38+
| [`@Results`](/docs/reports/csv#results-annotation) | Feature<br/>Rule<br/>Scenario<br/>StepDef<br/>Scenario Outline<br/>Examples | [v3.77.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.77.0) | Generates CSV results for a gherkin node |
39+
| [`@ShadowRoot`](/docs/dsl#element-locators) | Step | [v4.8.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v4.8.0) | Can be used on an element locator that selects a shadow DOM root |
3940
| `@Trim` | Step | [v3.62.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.62.0) | Trims strings when performing comparison operations |
4041
| `@IgnoreCase` | Step | [v3.62.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v3.62.0) | Ignores case when performing comparison operations |
4142
| `@Ignore` | Feature<br/>Scenario<br/>Rule<br/>Background<br/>Examples | [v1.0.0](https://github.com/gwen-interpreter/gwen-web/releases/tag/v1.0.0) | Ignores and skips over a Gherkin block/node to avoid evaluation |

docusaurus.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = {
4141
label: 'FAQ',
4242
},
4343
{
44-
href: '/docs/string-interpolation#elvis-operator',
44+
href: '/docs/dsl#element-locators',
4545
position: 'left',
4646
label: "What's New?",
4747
},

0 commit comments

Comments
 (0)