Skip to content
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 access cdp.Driver.client #755

Open
lorico opened this issue Oct 4, 2022 · 1 comment
Open

How to access cdp.Driver.client #755

lorico opened this issue Oct 4, 2022 · 1 comment
Labels
area/drivers HTML drivers type/question Further information is requested

Comments

@lorico
Copy link

lorico commented Oct 4, 2022

Hi!
I would need to access the "cdp.Driver.client" object, because I would like to modify the "SetDownloadBehavior" of the cdp chrome driver (in fact, I would like to be able to modify the location where files gets downloaded, for that I need to "SetDownloadPath":
https://pkg.go.dev/github.com/mafredri/cdp?utm_source=godoc#Page.SetDownloadBehavior )

But this object is private (client).
Is there a way for me to be able to manipulate the client, throught the context of whatever else so I could modify this SetDownloadPath by any mean without rebuilding your whole project ?

Thanks a lot in advance for any tip! And congratulations again, amazing project !

@ziflex
Copy link
Member

ziflex commented Oct 9, 2022

Hey,

you can extend the existing one and register it as a custom driver.

@ziflex ziflex added type/question Further information is requested area/drivers HTML drivers labels Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/drivers HTML drivers type/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants