Closed
Description
Version
1.52.0
Steps to reproduce
I have a js fileana.js
:
var analyzer = function {
this.analyze = function(){
……
let listeners = getEventlisteners(element);
……
}
}
const analyzer = new Analyzer()
1.I injected through page.add_init_script(path=./ana.js)
.
2.I tried page.evaluate("analyzer.analyze()")
called analyzer.analyze
, but failed
- I tried to use
cdpSession
and the call also failed
Is here any solution?
Expected behavior
I called successfully!
Actual behavior
failed!!
Additional context
No response
Environment
- Operating System: [Ubuntu 22.04]
- CPU: [arm64]
- Browser: [All, Chromium, Firefox, WebKit]
- Python Version: [3.12]
- Other info:
Metadata
Metadata
Assignees
Labels
No labels