Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

### Changes

- [Tester] A test now opens its start URL before it reads the page, so its first action is chosen from the
page the scenario actually starts on. Previously the opening step was planned from whatever page the previous
test left open — a test starting on a create form could spend its whole run on the list page behind it,
never filling the form.

- [Pilot] When the app reports an action succeeded but the record is not visible on the page, Pilot now asks
the API whether it was stored instead of failing on what the screenshot shows. A record the API cannot find
is still a failure. Needs API access configured; without it, Pilot judges from the page as before.
Expand Down
6 changes: 3 additions & 3 deletions src/ai/tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ export class Tester extends TaskAgent implements Agent {
let initialState = ActionResult.fromState(state);
const currentUrl = state.fullUrl || state.url;
let startOnCurrentPage = opts.startOnCurrentPage;
if (isErrorPage(initialState) && !startOnCurrentPage && task.startUrl && normalizeUrl(currentUrl) !== normalizeUrl(task.startUrl)) {
debugLog(`Recovering from error page at ${currentUrl} by navigating to ${task.startUrl}`);
if (!startOnCurrentPage && task.startUrl && normalizeUrl(currentUrl) !== normalizeUrl(task.startUrl)) {
debugLog(`Opening test start URL ${task.startUrl} before building context (was at ${currentUrl})`);
try {
await this.explorer.visit(task.startUrl);
state = this.stateManager.getCurrentState();
if (!state) throw new Error('No state found after navigating to test start URL');
initialState = ActionResult.fromState(state);
startOnCurrentPage = true;
} catch (error) {
debugLog(`Could not recover from error page: ${compactErrorMessage(error)}`);
debugLog(`Could not open test start URL: ${compactErrorMessage(error)}`);
}
}
if (isErrorPage(initialState)) {
Expand Down
Loading