- Introdução
- Melhores práticas
- Capabilities
- Habilidades
- CLI
- Exemplos
- Visão geral de exemplos
- Receita: criar um agente
- Receita: automatizar com RPA
- Receita: insira dados em um aplicativo da Web
- Receita: extrair dados de um aplicativo de desktop
- Receita: refatorar e testar um fluxo de trabalho
- Receita: um processo baseado em fila com REFramework
- Receita: criar um fluxo no Maestro
- Receita: criar um Maestro Case
- Receita: app codificado e fluxo de trabalho da API
- Receita: crie uma função codificada
- Receita: verifique uma versão com o Test Manager
- Receita: extrair dados de documentos com IXP
- Avançado
- Ajuda
Automação de testes do Playwright
Traga um pacote Playwright existente para o UiPath Test Manager com a habilidade uipath-test, sem necessidade de alterações de código.
Playwright test automation is available only for cloud environments. It is not available in Automation Suite.
With the uipath-test skill, your coding agent brings an existing Playwright suite into UiPath Test Manager with no code changes. It packages the suite, uploads it to Orchestrator, runs it as a test set, and reports the results.
Pré-requisitos
- UiPath CLI (
uip) installed and authenticated (uip login). The--playwright-projectflag requires CLI version 1.203.0 or later. - UiPath skills installed (
uip skills install --agent <agent>), includinguipath-test. - Test Manager delivered through Test Cloud, with Playwright support enabled for your tenant. Without it, Test Manager never creates the test cases.
- Playwright 1.19 or later, installed locally in the project: a
package.jsonwith@playwright/test, a lockfile, and aplaywright.configfile. Test Manager supports npm withpackage-lock.json.uip tm packalso acceptsyarn.lock,pnpm-lock.yaml, andbun.lock. The skill does not install Playwright. - An Orchestrator folder with a Cloud Robots – Serverless machine and a member that can run unattended sessions, such as a robot account. The agent can create and assign the machine. Without the member, executions are canceled or produce no results.
- The Test Executor role in the Test Manager project for the robot account that runs the tests. Without it, results never reach Test Manager. See Prerequisites.
Traga seu pacote para o Test Manager
-
Open your coding agent in the Playwright project's root folder.
-
Peça para trazer o pacote para o Test Manager:
"Escrevi alguns scripts de Playwright para testar meu site [Nome do produto]. Você pode me ajudar a executar esses testes usando o serviço Test Manager da UiPath?"
-
On the first run, tell the agent which Test Manager project to use or create, and which Playwright project from
playwright.config(for example,chromium) to run first. -
Review the pass, fail, and skip summary. It separates assertion mismatches from environment or infrastructure issues.
Result: The agent sets the project's default Orchestrator execution folder, packages the suite into a .nupkg, and uploads it to the Orchestrator package feed. Test Manager creates and links one test case per test. The agent creates a test set scoped to the selected Playwright project, runs it, and polls until it finishes.
Corrija um teste com falha e execute novamente
"Corriga os testes com falha e execute novamente o conjunto de smoke test."
The agent fixes the test code, repacks with a bumped --package-version, re-uploads, and re-runs the same test set. The Playwright project selection persists on the test set.
Don't use uip tm executions retry to re-run after a fix. It re-runs the previous failures against the old package version.
Referência de comando
For troubleshooting, or scripting the same flow in CI.
| Etapa | Command |
|---|---|
| Crie o projeto do Test Manager | uip tm project create --name "SwagLabs" --project-key SWAG --description "..." --output json |
| Definir a pasta de execução padrão | uip tm project set-default-folder --project-key SWAG --folder-key <key> --output json |
| Empacotar o projeto Playground | uip tm pack --project-path . --type playwright --project-key SWAG --name SwagLabsPlaywright --package-version 1.0.0 -o .packages --output json |
| Carregar no Orchestrator | uip or packages upload ".packages/SwagLabsPlaywright.1.0.0.nupkg" --output json |
| Enquete para casos de teste ingeridos | uip tm testcases list --project-key SWAG --output json |
Create a test set and note the returned TestSetKey | uip tm testsets create --project-key SWAG --name "Smoke" --output json |
| Add this package's test cases to it | uip tm testcases add --test-set-key <test-set-key> --test-case-keys <keys> --output json |
| Execute o conjunto de testes, com escopo de um projeto do Playground | uip tm testsets run --test-set-key <test-set-key> --playwright-project chromium --output json |
| Wait for the execution to finish | uip tm wait --execution-id <id> --project-key SWAG --timeout 120 |
| Get the execution results | uip tm report get --execution-id <id> --project-key SWAG --output json |
| Detalhes da falha de pull para a triagem | uip tm executions testcaselogs list --execution-id <id> --project-key SWAG --only-failed --output json |
Read pass or fail from uip tm report get. The uip tm wait exit codes depend on the CLI version: 1.207.0 and later exit 1 when a test failed or the run was canceled and 4 on timeout; earlier versions exit 0 at any terminal state and 2 on timeout. On a timeout, run wait again.
Veja também
- Testes
uip tm packuip tm testsets:testsets runand--playwright-project.uip or packages