From 84624facea76cecc3735729fc23e8a1ee2b1fac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Thu, 5 Nov 2026 15:44:49 -0300 Subject: [PATCH] Translate the engine error of every fixture call, not only Browser steps Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK --- COMPATIBILITY.md | 2 +- .../src/content/docs/migrate/playwright.mdx | 2 +- skills/e2e-dotnet/SKILL.md | 5 +- src/E2E/Engine/IEngine.cs | 4 +- src/E2E/Run/Browser.cs | 41 +------ src/E2E/Run/FixtureRecording.cs | 35 ++++++ src/E2E/Run/Fixtures.cs | 5 +- .../FixtureRuntime/AppSteeringHooksTests.cs | 2 +- .../ExplicitFixtureOperationsTests.cs | 109 ++++++++++++++++++ .../SurfaceScreenshotWhileNavigatingTests.cs | 5 +- 10 files changed, 164 insertions(+), 46 deletions(-) create mode 100644 src/E2E/Run/FixtureRecording.cs create mode 100644 tests/E2E.Tests/FixtureRuntime/ExplicitFixtureOperationsTests.cs diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 1453da521..0f19a3b82 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -122,7 +122,7 @@ Names are C# versions of the JavaScript API: `agent.act` is `ActAsync`, `screen. ## Error codes that differ -A locator reports an engine failure as upstream's `translateLocatorError` (`LocatorEngine.TranslateLocatorError`, over `ErrorSerializer.TranslateEngineError`, upstream's `translateEngineError`, `internal/errors.ts`) does, with the engine error as `InnerException` and the locator's description added to the message (#846): `NOT_ACTIONABLE` and `ACTION_MAY_HAVE_COMMITTED` are `ACTION_FAILED`, `OPERATION_TIMEOUT` is `ACTION_FAILED` (`operation timed out: `), `NODE_STALE` and `FRAME_NOT_FOUND` are `LOCATOR_NOT_FOUND`, `FRAME_AMBIGUOUS` is `LOCATOR_AMBIGUOUS`, and `INVALID_STATE` is `APP_NOT_OPEN`. `CANCELLED` is an `EngineException` of that code (`operation cancelled`), `UNSUPPORTED_CAPABILITY` is a `ConfigurationException` (category `configuration`), and `ENGINE_FAILURE`, any other engine code, and an error that is no e2e error are an `EngineException` `ENGINE_FAILURE` (category `infrastructure`), each with the original error as `InnerException`, as upstream's `translateEngineError` wraps them (#885). A recorded browser step maps the engine error it throws the same way (a `Browser` outside a session runs the call bare, like the surface upstream's engine tests call; `Browser.Translated`, upstream's `translated` in `run/fixture-recording.ts`), with ` in