Browser Question Workflow
Operate the user's existing browser session and finish authorized question workflows end to end.
This workflow is developed and verified primarily for U校园 / Unipus. Treat all other websites as unverified adaptations: inspect each interaction and never assume that submission or completion detection is correct.
Rules
- Use answers supplied by the user, a user-designated answer file, or answers explicitly revealed by the page.
- Do not infer answers for graded assessments. Ask for the missing answer source or leave those questions unanswered.
- Preserve the logged-in session. Prefer Chrome control for existing Chrome state.
- Treat a click on
提交as an action requiring explicit or already-given user authorization. - Skip question types the user excluded, such as speaking or recording tasks.
- Never equate "visited", "answered", or "submitted one page" with "section completed".
- Outside U校园 / Unipus, use short steps and verify every write, navigation, submission, and completion signal before continuing.
Workflow
-
Inventory the task
- Identify target units, sections, exclusions, answer sources, and whether submission is authorized.
- Convert answers into a structured map keyed by section and question number.
- For randomized options, store exact option text, not only letters.
-
Inspect live state
- Read URL, visible buttons, tabs, question count, input count, dialogs, iframes, and completion icons.
- Record which sections are complete, in progress, or untouched.
- Start from the first incomplete allowed section.
-
Determine page shape
- Classify the page as one-question-per-page, all-questions-on-one-page, text blanks, mixed form, or cross-origin iframe.
- Check whether option order changes between attempts.
- Read references/browser-patterns.md for robust interaction patterns.
-
Fill conservatively
- Match radio answers by exact normalized option text when possible.
- Use letters or indexes only after confirming the current option order.
- Prefer bulk form filling for stable all-on-one pages.
- For reactive text fields, dispatch realistic
inputandchangeevents. - On one-question-per-page flows, answer, click
下一题, wait for navigation, then re-query the DOM.
-
Submit and verify every section
- Submit only after checking answered count against expected count.
- Wait for a result,
继续学习, score, review state, or completion marker. - After moving to the next section, verify the previous section's directory icon changed to completed.
- If an item remains "in progress", inspect its child pages before assuming the cause.
-
Handle tests and iframes
- Click entry confirmation, start the test, then wait for resources to finish loading.
- Confirm and dismiss any "resources loaded" overlay before filling.
- Use accessibility snapshots and form-fill tools for cross-origin iframe contents.
- Submit, verify score/answered count, then use the test system's return or course link so the parent course receives the result.
-
Recover from interruption
- Re-inspect completion icons and current question state.
- Re-enter only incomplete sections.
- Refill a section when the page shows answers but no completed marker.
- Keep a concise progress ledger: completed, skipped by instruction, pending, and blocked.
-
Final audit
- Re-read all target completion icons after navigation or refresh.
- Report completed sections, skipped question types, scores, and any remaining in-progress reason.
Efficiency
- Use one inspection call to collect URL, visible buttons, links, input counts, and completion markers.
- Batch independent DOM reads; batch stable form writes.
- Use direct section links or known routes only after confirming they belong to the current course.
- Wait after navigation and submission; do not run long scripts across page transitions.
- Prefer short, restartable operations over one fragile script covering many pages.
Completion Standard
Call a section complete only when at least one durable signal confirms it:
- the directory marker says completed;
- a result page shows the expected answered count or passing score;
- the page exposes a submitted/review state and the course records it.
For sections containing excluded speaking/recording tasks, report the non-excluded portion as submitted and explain why the parent section remains in progress.