Closed Bug 1623297 Opened 4 years ago Closed 10 months ago

Runtime.callFunctionOn doesn't return objectId when returnByValue is false

Categories

(Remote Protocol :: CDP, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

References

Details

The following can be replicated in a Puppeteer test when using the following line:

let element = await page.waitForSelector("h1");

Here how Chrome behaves:

 puppeteer:protocol SEND ► {"sessionId":"FFF0703460B692B2245C6733A21F3608","method":"Runtime.callFunctionOn","params":{"functionDeclaration":"async function waitForPredicatePageFunction(predicateBody, polling, timeout, ...args) {\n  const p
[..]
"value":"h1"},{"value":false},{"value":false},{"value":false}],"returnByValue":false,"awaitPromise":true,"userGesture":true},"id":18} +3ms
  puppeteer:protocol ◀ RECV {"id":18,"result":{"result":{"type":"object","subtype":"node","className":"HTMLHeadingElement","description":"h1","objectId":"{\"injectedScriptId\":4,\"id\":1}"}},"sessionId":"FFF0703460B692B2245C6733A21F3608"} +4ms

And that is what we currently get with Firefox:

  puppeteer:protocol ◀ RECV {"sessionId":1,"id":18,"result":{"result":{"type":"object","subtype":"node"}}} +8ms

The objectId is needed for commands like describeNode, and not returning it will break certain parts of element interaction.

Blocks: 1549488
Summary: Runtime.evaluate doesn't return objectId when returnByValue is false → Runtime.callFunctionOn doesn't return objectId when returnByValue is false

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3
Component: CDP: Runtime → CDP

Remote value serialization and deserialization works fine with WebDriver BiDi. As such we won't fix this bug.

Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.