Authenticating on a windows pop up via chromedriver in Java

18 views
Skip to first unread message

bharathi sriram

unread,
May 2, 2018, 6:25:05 PM5/2/18
to Selenium Users
Hello all-
I have been looking for info in the net, and none of the solution worked for me.
Below line of code works fine in FF, but does not do anything in Chrome(test run also hangs)
driver.get("https://username:pwd@HOSTNAME");
I tried many ways in chrome, nothing worked for me. If you know of any solution to this issue, Please help out.
I used Robot class, I tried getWindowHandles and then did sendKeys().

Thanks,

Jonathan Herbaut

unread,
May 3, 2018, 2:57:21 AM5/3/18
to Selenium Users
Hi !
My answer will seems weird, but try to add a / at the end of your call : driver.get("https://username:pwd@HOSTNAME/");
I tried to find a way to authenticate like you, and when I add that /, I wanted to sing just after "It's a kind of magic".

badri manoj

unread,
May 3, 2018, 2:58:20 AM5/3/18
to seleniu...@googlegroups.com
Can you share what error you are getting exactly. Before running the
script change the browser zoom to 100% and try run some times if your
browser zoom is other than 100% scripts willl not Run.

Thanks and Regards,
Manoj Badri
Thanks and Regards,
Badri Manoj
> --
> You received this message because you are subscribed to the Google Groups
> "Selenium Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to selenium-user...@googlegroups.com.
> To post to this group, send email to seleniu...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/selenium-users/a1f69b05-303d-43dd-93a2-4b85f74e6f17%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages