Skip to content

Commit 7e9515f

Browse files
wakaleoclaude
andcommitted
docs: Document playwright.channel, playwright.baseurl, playwright.slowmo properties
Add a Serenity Playwright Properties reference table to configuration.md with all available -D flag properties. Update screenplay.md and cucumber-integration.md examples to include the new properties. Updated across EN, ES, and PT-BR translations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5e90d26 commit 7e9515f

9 files changed

Lines changed: 108 additions & 6 deletions

File tree

docs/playwright/configuration.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,35 @@ Run with visible browser:
254254
mvn verify -Dplaywright.headless=false
255255
```
256256

257+
### Serenity Playwright Properties
258+
259+
The following properties can be set in `serenity.properties`, `serenity.conf`, or as `-D` system property flags. They act as fallbacks — values set programmatically (via `Options`, `LaunchOptions`, or `NewContextOptions`) always take precedence.
260+
261+
| Property | Type | Description |
262+
|----------|------|-------------|
263+
| `playwright.browsertype` | `String` | Browser engine: `"chromium"`, `"firefox"`, or `"webkit"` |
264+
| `playwright.headless` | `Boolean` | Whether to run the browser in headless mode |
265+
| `playwright.channel` | `String` | Browser channel (e.g. `"chrome"`, `"msedge"`) |
266+
| `playwright.baseurl` | `String` | Base URL for `page.navigate()` with relative paths |
267+
| `playwright.slowmo` | `Double` | Slows down Playwright operations by the given milliseconds |
268+
| `playwright.tracing` | `Boolean` | Enable Playwright tracing for the trace viewer |
269+
270+
Example using command-line flags:
271+
272+
```bash
273+
mvn verify -Dplaywright.channel=chrome -Dplaywright.baseurl=https://staging.example.com -Dplaywright.slowmo=200
274+
```
275+
276+
Or in `serenity.properties`:
277+
278+
```properties
279+
playwright.browsertype=chromium
280+
playwright.headless=false
281+
playwright.channel=chrome
282+
playwright.baseurl=https://staging.example.com
283+
playwright.slowmo=200
284+
```
285+
257286
### Browser Context Options
258287

259288
Configure browser context for each test:

docs/playwright/cucumber-integration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ target/site/serenity/index.html
517517
# Browser settings
518518
playwright.browsertype=chromium
519519
playwright.headless=true
520+
playwright.channel=chrome
521+
playwright.baseurl=https://staging.example.com
522+
playwright.slowmo=200
520523

521524
# Screenshot settings
522525
serenity.take.screenshots=FOR_FAILURES

docs/playwright/screenplay.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,9 @@ Configure Playwright browser options via system properties or programmatically:
664664
# serenity.properties
665665
playwright.browsertype=chromium
666666
playwright.headless=true
667-
playwright.slowMo=100
667+
playwright.channel=chrome
668+
playwright.baseurl=https://staging.example.com
669+
playwright.slowmo=200
668670
```
669671

670672
Or programmatically with explicit launch options:
@@ -702,7 +704,7 @@ actor.can(
702704
);
703705
```
704706

705-
Serenity properties (`playwright.headless`, `playwright.browsertype`) are used as fallbacks when the corresponding option is not set in the factory.
707+
Serenity properties (`playwright.headless`, `playwright.browsertype`, `playwright.channel`, `playwright.baseurl`, `playwright.slowmo`) are used as fallbacks when the corresponding option is not set in the factory.
706708

707709
### Screenshot Configuration
708710

i18n/es/docusaurus-plugin-content-docs/current/playwright/configuration.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,35 @@ Ejecuta con navegador visible:
125125
mvn verify -Dplaywright.headless=false
126126
```
127127

128+
### Propiedades de Serenity para Playwright
129+
130+
Las siguientes propiedades se pueden configurar en `serenity.properties`, `serenity.conf`, o como flags `-D` de propiedades del sistema. Actuan como valores por defecto — los valores configurados programaticamente (via `Options`, `LaunchOptions`, o `NewContextOptions`) siempre tienen prioridad.
131+
132+
| Propiedad | Tipo | Descripcion |
133+
|-----------|------|-------------|
134+
| `playwright.browsertype` | `String` | Motor del navegador: `"chromium"`, `"firefox"`, o `"webkit"` |
135+
| `playwright.headless` | `Boolean` | Si el navegador se ejecuta en modo headless |
136+
| `playwright.channel` | `String` | Canal del navegador (ej. `"chrome"`, `"msedge"`) |
137+
| `playwright.baseurl` | `String` | URL base para `page.navigate()` con rutas relativas |
138+
| `playwright.slowmo` | `Double` | Ralentiza las operaciones de Playwright por los milisegundos dados |
139+
| `playwright.tracing` | `Boolean` | Habilita el tracing de Playwright para el visor de trazas |
140+
141+
Ejemplo usando flags de linea de comandos:
142+
143+
```bash
144+
mvn verify -Dplaywright.channel=chrome -Dplaywright.baseurl=https://staging.example.com -Dplaywright.slowmo=200
145+
```
146+
147+
O en `serenity.properties`:
148+
149+
```properties
150+
playwright.browsertype=chromium
151+
playwright.headless=false
152+
playwright.channel=chrome
153+
playwright.baseurl=https://staging.example.com
154+
playwright.slowmo=200
155+
```
156+
128157
### Opciones de contexto de navegador
129158

130159
Configura el contexto de navegador para cada prueba:

i18n/es/docusaurus-plugin-content-docs/current/playwright/cucumber-integration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ target/site/serenity/index.html
517517
# Configuracion del navegador
518518
playwright.browsertype=chromium
519519
playwright.headless=true
520+
playwright.channel=chrome
521+
playwright.baseurl=https://staging.example.com
522+
playwright.slowmo=200
520523

521524
# Configuracion de capturas de pantalla
522525
serenity.take.screenshots=FOR_FAILURES

i18n/es/docusaurus-plugin-content-docs/current/playwright/screenplay.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,9 @@ Configura las opciones del navegador Playwright via propiedades del sistema o pr
583583
# serenity.properties
584584
playwright.browsertype=chromium
585585
playwright.headless=true
586-
playwright.slowMo=100
586+
playwright.channel=chrome
587+
playwright.baseurl=https://staging.example.com
588+
playwright.slowmo=200
587589
```
588590

589591
O programaticamente con opciones de lanzamiento explicitas:
@@ -621,7 +623,7 @@ actor.can(
621623
);
622624
```
623625

624-
Las propiedades de Serenity (`playwright.headless`, `playwright.browsertype`) se utilizan como valores por defecto cuando la opcion correspondiente no esta definida en el factory.
626+
Las propiedades de Serenity (`playwright.headless`, `playwright.browsertype`, `playwright.channel`, `playwright.baseurl`, `playwright.slowmo`) se utilizan como valores por defecto cuando la opcion correspondiente no esta definida en el factory.
625627

626628
### Configuracion de capturas de pantalla
627629

i18n/pt-BR/docusaurus-plugin-content-docs/current/playwright/configuration.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,35 @@ Execute com navegador visível:
125125
mvn verify -Dplaywright.headless=false
126126
```
127127

128+
### Propriedades do Serenity para Playwright
129+
130+
As seguintes propriedades podem ser configuradas em `serenity.properties`, `serenity.conf`, ou como flags `-D` de propriedades do sistema. Elas atuam como valores padrão — valores configurados programaticamente (via `Options`, `LaunchOptions`, ou `NewContextOptions`) sempre têm prioridade.
131+
132+
| Propriedade | Tipo | Descrição |
133+
|-------------|------|-----------|
134+
| `playwright.browsertype` | `String` | Motor do navegador: `"chromium"`, `"firefox"`, ou `"webkit"` |
135+
| `playwright.headless` | `Boolean` | Se o navegador executa em modo headless |
136+
| `playwright.channel` | `String` | Canal do navegador (ex. `"chrome"`, `"msedge"`) |
137+
| `playwright.baseurl` | `String` | URL base para `page.navigate()` com caminhos relativos |
138+
| `playwright.slowmo` | `Double` | Desacelera as operações do Playwright pelos milissegundos dados |
139+
| `playwright.tracing` | `Boolean` | Habilita o tracing do Playwright para o visualizador de traces |
140+
141+
Exemplo usando flags de linha de comando:
142+
143+
```bash
144+
mvn verify -Dplaywright.channel=chrome -Dplaywright.baseurl=https://staging.example.com -Dplaywright.slowmo=200
145+
```
146+
147+
Ou em `serenity.properties`:
148+
149+
```properties
150+
playwright.browsertype=chromium
151+
playwright.headless=false
152+
playwright.channel=chrome
153+
playwright.baseurl=https://staging.example.com
154+
playwright.slowmo=200
155+
```
156+
128157
### Opções de Contexto do Navegador
129158

130159
Configure o contexto do navegador para cada teste:

i18n/pt-BR/docusaurus-plugin-content-docs/current/playwright/cucumber-integration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ target/site/serenity/index.html
517517
# Configurações do navegador
518518
playwright.browsertype=chromium
519519
playwright.headless=true
520+
playwright.channel=chrome
521+
playwright.baseurl=https://staging.example.com
522+
playwright.slowmo=200
520523

521524
# Configurações de captura de tela
522525
serenity.take.screenshots=FOR_FAILURES

i18n/pt-BR/docusaurus-plugin-content-docs/current/playwright/screenplay.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,9 @@ Configure opções do navegador Playwright via propriedades do sistema ou progra
583583
# serenity.properties
584584
playwright.browsertype=chromium
585585
playwright.headless=true
586-
playwright.slowMo=100
586+
playwright.channel=chrome
587+
playwright.baseurl=https://staging.example.com
588+
playwright.slowmo=200
587589
```
588590

589591
Ou programaticamente com opções de lançamento explicitas:
@@ -621,7 +623,7 @@ actor.can(
621623
);
622624
```
623625

624-
As propriedades do Serenity (`playwright.headless`, `playwright.browsertype`) são usadas como valores padrão quando a opção correspondente não esta definida no factory.
626+
As propriedades do Serenity (`playwright.headless`, `playwright.browsertype`, `playwright.channel`, `playwright.baseurl`, `playwright.slowmo`) são usadas como valores padrão quando a opção correspondente não esta definida no factory.
625627

626628
### Configuração de Captura de Tela
627629

0 commit comments

Comments
 (0)