Skip to content

DOC: rewrite retry.md for clarity and concision#5496

Open
DavertMik wants to merge 261 commits into3.xfrom
4.x-docs-update
Open

DOC: rewrite retry.md for clarity and concision#5496
DavertMik wants to merge 261 commits into3.xfrom
4.x-docs-update

Conversation

@DavertMik
Copy link
Contributor

Summary

  • Remove ~260 lines of duplicated content: "Common Patterns" and "Configuration Reference" sections restated everything already shown in the numbered sections
  • Move self-healing to its correct position — after retryTo and before scenario retries, reflecting that it operates at the step level
  • Rewrite the self-healing entry with a code example and a bullet-list breakdown of how AI healing works step by step
  • Link to /heal and /ai instead of duplicating their content inline

Test plan

  • Review rendered docs for correct section ordering (Helper → Manual → Auto → retryTo → Healing → Scenario → Feature → Hook)
  • Confirm all cross-links resolve (/heal, /ai, /effects#retryto, /timeouts)

🤖 Generated with Claude Code

DavertMik and others added 30 commits February 10, 2026 00:13
Removed dependency installation and npm tag determination steps.
- Strip 'v' prefix from release tag when setting version
- Use npm_config_ignore_scripts env var to skip prepare script
  (known npm bug where --ignore-scripts flag doesn't work)
- Always publish to 'beta' tag for prerelease workflow
- Change permissions from contents:write to contents:read

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* improved context methods

* fix: pass context parameter through Appium helper overrides

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add context parameter to seeElement, dontSeeElement, fillField, selectOption

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Enhanced Retry Mechanisms - Remove Code Duplication

* add typof test

* new version

* remove md rerty

* add retry documentation
* add aiTrace plugin for AI-assisted test debugging

* add path and little fix

* add pr fix

* fix test

* fix bug and add test support to testomatio

* Add mcp server (#5452)

* add mcp server

* fix unit test

---------

Co-authored-by: Michael Bodnarchuk <DavertMik@users.noreply.github.com>
* add event.dispatcher.emit

* add fix

* remove brush

* add runInParent for plagins

* add fix

* add helper

* fix

* fix regular mode

* fix regular mode 2

* fix regular mode 3

* fix workers again

* fix step

* fix old fit step
* implemented path normalization

* fixed tests

* added path check to waiter

* imrpved wait* methods

* fix: correct waitForFunction argument order in waitCurrentPathEquals

* fix: correct waitForFunction argument order in Puppeteer waitCurrentPathEquals

---------

Co-authored-by: DavertMik <davert@testomat.io>
)

* fix: make XPath relative in buildLocatorString for within() scope (#5473)

Playwright's XPath engine auto-converts "//..." to ".//..." when searching
within an element, but only when the selector starts with "/". Locator methods
like at(), first(), last() wrap XPath in parentheses (e.g. "(//...)[position()=1]"),
bypassing that auto-conversion and causing XPath to search from the document root
instead of the within() scope.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add acceptance test for locate().at().find() inside within() (#5473)

Adds a Playwright acceptance test that verifies XPath from locate().at().find()
is correctly scoped when used inside within().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…5479)

* feat: add context parameter to appendField, clearField, attachFile

Add optional context parameter to remaining form-filling methods
(appendField, clearField, attachFile) across Playwright, Puppeteer,
and WebDriver helpers for consistency with fillField, selectOption,
checkOption, and uncheckOption which already support it.

This allows scoping element search to a specific DOM container:
  I.appendField('Name', 'jon', '.form-container')
  I.clearField('Name', '.form-container')
  I.attachFile('Avatar', 'data/avatar.jpg', '.form-container')

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add tests for context parameter on appendField, clearField, attachFile

Add shared webapi tests verifying that context scoping works for
appendField, clearField, and attachFile. Extended the context.php
test page with pre-filled values and file inputs to support the tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: simplify Playwright clearField signature to match other helpers

Remove unused `options` parameter from Playwright's clearField. The
options were accepted but never passed to the underlying clear() call.
Now all helpers have consistent `clearField(locator, context)` signature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add context parameter to appendField, attachFile, clearField docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: clarify context parameter is optional in all form method docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add context parameter to seeInField and dontSeeInField

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: pass context string (not locateFn) to findFields in WebDriver proceedSeeField

proceedSeeField was double-wrapping context through prepareLocateFn before
passing to findFields, which already handles context internally. This caused
"locator.replace is not a function" errors in 37 WebDriver tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When the target element is not an <input type="file">, attachFile now
falls back to dispatching synthetic drag-and-drop events (dragenter,
dragover, drop) with a DataTransfer containing the file. This enables
file uploads to dropzone libraries (Dropzone.js, react-dropzone, etc.).

Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the target element is not an <input type="file">, attachFile now
falls back to dispatching synthetic drag-and-drop events (dragenter,
dragover, drop) with a DataTransfer containing the file. This enables
file uploads to dropzone libraries (Dropzone.js, react-dropzone, etc.).

Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ror (#5491)

* feat: improve MultipleElementsFound error and add strict mode to all helpers

Add strict mode support to Puppeteer and WebDriver helpers (previously only
Playwright). When `strict: true`, single-element operations (click, fillField,
etc.) throw MultipleElementsFound if more than one element matches.

Refactor MultipleElementsFound to use WebElement[] with async fetchDetails()
that shows absolute XPath and minified outerHTML for each matched element.
Add toAbsoluteXPath() and toOuterHTML() to WebElement class. Auto-call
fetchDetails() in CLI error display.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: extract simplifyHtmlElement to lib/html.js and add toSimplifiedHTML to WebElement

Move HTML simplification logic (removeNonInteractiveElements + unwrap + truncate)
into a reusable simplifyHtmlElement() function in lib/html.js. Add toSimplifiedHTML()
method to WebElement that combines toOuterHTML() with simplifyHtmlElement().
MultipleElementsFound.fetchDetails() now uses webEl.toSimplifiedHTML() directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: WebDriver strict mode - use Array.from for element collections and fix HTML unwrap regex

WebdriverIO $$ returns a special collection, not a plain array. Using
Array.from() before .map() ensures WebElement[] is a real array with .length.
Also fix simplifyHtmlElement regex to handle cases where <head> tag is absent
in the parse5 output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add optional context parameter to moveCursorTo

Allow scoping moveCursorTo to a parent element by passing a context
locator as the second argument, matching the pattern used by click,
seeElement, etc. When the second arg is non-number, it is treated
as context instead of offsetX.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use page instead of context for moveCursorTo context lookup in Puppeteer

In Puppeteer, this.context is scoped to <body>, so searching for "body"
within it returns empty. Use this.page directly to find the context
element from the document root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove repeated "Common Patterns" and "Configuration Reference" sections
- Move self-healing to step-level position (after retryTo, before scenario retries)
- Explain AI healing flow as bullet list showing what happens at each stage
- Link to /heal and /ai instead of duplicating their content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ID locator types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants