ClericPy / ichrome

Chrome controller for Humans, based on Chrome Devtools Protocol(CDP) and python3.7+.
https://pypi.org/project/ichrome/
MIT License
228 stars 29 forks source link

how to close browser alert #69

Closed bpkddr closed 2 years ago

bpkddr commented 2 years ago

how to close browser alert such "alert to know your location"

ClericPy commented 2 years ago

I've never seen that dialog window before, please ensure it can be handled by Chrome CDP.

https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-handleJavaScriptDialog

bpkddr commented 2 years ago

alert like this sir

https://prnt.sc/1xdtvf1

ClericPy commented 2 years ago

Try with await tab.handle_dialog(accept=True)

bpkddr commented 2 years ago

i'll try

thank you