-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use execute_script on nodriver ? #1850
Comments
dude, pls check async def evaluate(
self, expression: str, await_promise=False, return_by_value=True
):
remote_object, errors = await self.send(
cdp.runtime.evaluate(
expression=expression,
user_gesture=True,
await_promise=await_promise,
return_by_value=return_by_value,
allow_unsafe_eval_blocked_by_csp=True,
)
)
if errors:
raise ProtocolException(errors)
if remote_object:
if return_by_value:
if remote_object.value:
return remote_object.value
else:
return remote_object, errors You're welcome) |
@gnori-zon Thank you ! that work! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I looked through some nodriver source codes, but I didn’t seem to see any methods related to execute_script. Is it not possible to inject javascript into nodriver?
The text was updated successfully, but these errors were encountered: