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

HandleAuth, alert not closing #28

Closed
mer0men opened this issue May 13, 2020 · 5 comments
Closed

HandleAuth, alert not closing #28

mer0men opened this issue May 13, 2020 · 5 comments
Labels
question Questions related to rod

Comments

@mer0men
Copy link

mer0men commented May 13, 2020

Hello, i want to use proxy with auth, but i can't login.
When i add header in chromium with proxy, after i have an alert with username and password for auth, but if i user your method HandleAuth nothing happens, i need to click submit button to auth.
How can i do it with code?

P.S. Sorry for my English)

@mer0men mer0men added the question Questions related to rod label May 13, 2020
@ysmood
Copy link
Member

ysmood commented May 13, 2020

Sorry, that's too hard to understand what's happening to you. I need more info to understand how to reproduce your issue on my local.

Here's the example to use the code:

https://github.com/ysmood/rod/blob/3ae35ce463f28e3ce8055e6dafda5eb33f39fc53/browser_test.go#L70-L72

Or can you show me your code that doesn't work?

@mer0men
Copy link
Author

mer0men commented May 13, 2020

2020-05-13-163710_1366x768_scrot

i need to click button to close the alert and auth, how can i close the alert in headless mode?

@ysmood
Copy link
Member

ysmood commented May 13, 2020

Look at my code carefully 😂 , the HandleAuth should be set up before the Navigation, your code should be:

browser.HandleAuth("a", "b")
page := browser.Page("https://ifconfig.co")

If this dialog blocks your navigation, how can your code go on? Think twice 😂

@mer0men
Copy link
Author

mer0men commented May 13, 2020

Well........
I'm too stupid, thank you)

@ysmood
Copy link
Member

ysmood commented May 13, 2020

BTW, the comment of the HandleAuth is very clear: HandleAuth for the next basic HTTP authentication.

It's the next dialog, not the previous 😂

@ysmood ysmood closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants