fix(qa): 探针 evaluate 取值层级修正
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0be9cafb9b
commit
06747cffc0
@ -154,7 +154,9 @@ def main() -> int:
|
||||
"expression": "location.href + ' || ' + document.body.innerText.replace(/\\n+/g,' | ').slice(0,200)",
|
||||
"returnByValue": True})
|
||||
print("\n==== 页面终态 ====")
|
||||
print(str(r.get("result", {}).get("result", {}).get("value", ""))[:300])
|
||||
# call() 返回 CDP 应答的 result 字段:Runtime.evaluate 的值在 result.result.value
|
||||
val = r.get("result", {}).get("value", "") if "result" in r else r
|
||||
print(str(val)[:300])
|
||||
except Exception as e: # noqa: BLE001 - 取证收尾,异常只记录
|
||||
print(f"页面终态读取失败:{e}")
|
||||
return 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user