There is a Node.js environment in playwright, why not just use it?
from pathlib import Path
from playwright_nodejs import Nodejs
source = Path('test.js')
js = "console.log(result)"
re = Nodejs(source=source).call(js).exec()
print(re)
This is a simple tool to use the Node.js environment in the playwright package to execute your js script.
There is a Node.js environment in playwright, why not just use it?
from pathlib import Path
from playwright_nodejs import Nodejs
source = Path('test.js')
js = "console.log(result)"
re = Nodejs(source=source).call(js).exec()
print(re)
This is a simple tool to use the Node.js environment in the playwright package to execute your js script.
MIT License