diff --git a/android/app/src/main/java/cn/ilapage/goauto/agent/automation/PurchaseRehearsalExecutor.kt b/android/app/src/main/java/cn/ilapage/goauto/agent/automation/PurchaseRehearsalExecutor.kt index e408a8f..1f3fdfc 100644 --- a/android/app/src/main/java/cn/ilapage/goauto/agent/automation/PurchaseRehearsalExecutor.kt +++ b/android/app/src/main/java/cn/ilapage/goauto/agent/automation/PurchaseRehearsalExecutor.kt @@ -289,9 +289,12 @@ class PurchaseRehearsalExecutor( } val click = driver.clickFreshDetailed(target) when (click.result) { + // The parser already narrowed to a single semantic candidate; the + // ambiguity here comes from the live tree matching that target more + // than once at click time, so the wording must not claim otherwise. FreshActionResult.AMBIGUOUS -> return failure( SPEC_ENTRY_TARGET_AMBIGUOUS, - "规格入口候选不唯一 [${specEntryEvidence(screen, candidates.size)}]", + "规格入口点击目标不唯一 [${specEntryEvidence(screen, candidates.size)}]", ) FreshActionResult.SUCCESS -> Unit else -> return failure(SPEC_ENTRY_CLICK_FAILED, click.reason.specEntrySubreason()) diff --git a/android/app/src/test/java/cn/ilapage/goauto/agent/PurchaseRehearsalExecutorTest.kt b/android/app/src/test/java/cn/ilapage/goauto/agent/PurchaseRehearsalExecutorTest.kt index 5af1d33..8db029c 100644 --- a/android/app/src/test/java/cn/ilapage/goauto/agent/PurchaseRehearsalExecutorTest.kt +++ b/android/app/src/test/java/cn/ilapage/goauto/agent/PurchaseRehearsalExecutorTest.kt @@ -623,7 +623,7 @@ class PurchaseRehearsalExecutorTest { assertEquals("PURCHASE_SPEC_ENTRY_TARGET_AMBIGUOUS", ambiguous.errorCode) assertEquals( - "规格入口候选不唯一 [specEntryCandidates=1;explicit=1;nested=0;bottomPurchase=0;panelAlreadyOpen=false;reviewPage=false;pageEvidence=true]", + "规格入口点击目标不唯一 [specEntryCandidates=1;explicit=1;nested=0;bottomPurchase=0;panelAlreadyOpen=false;reviewPage=false;pageEvidence=true]", ambiguous.message, ) }