Passing basic authentication in geb

25 views
Skip to first unread message

Erics Nguyễn

unread,
Nov 12, 2018, 8:44:09 PM11/12/18
to Geb User Mailing List
i 'm a newbie with geb/ groovy/ automation test. i have a problem when testing a website with basic authentication. when using url for passing:  https://admin:ad...@example.com. but it still pop up the prompt, and click cancel or anything, the authentication is passing.
but when apply with geb, i cant see anything about geb prompt. how i passing basic authentication with other way.
thank you very much.

Michael Kutz

unread,
Nov 13, 2018, 3:18:25 AM11/13/18
to geb-...@googlegroups.com
In recent implementations of FF and Chrome passing username and password via URL is no longer accepted and the website you are trying to visit won't be shown. However the credentials are cached, so if you do one browser.go with username and password in the URL (not expecting anything being rendered), any subsequent visit of the site will be authenticated with the chache username and password.

Am Di., 13. Nov. 2018, 02:44 hat Erics Nguyễn <thico...@gmail.com> geschrieben:
i 'm a newbie with geb/ groovy/ automation test. i have a problem when testing a website with basic authentication. when using url for passing:  https://admin:ad...@example.com. but it still pop up the prompt, and click cancel or anything, the authentication is passing.
but when apply with geb, i cant see anything about geb prompt. how i passing basic authentication with other way.
thank you very much.

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/f9426371-bfc5-4560-a0c7-e62206466549%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Kutz

unread,
Nov 13, 2018, 4:57:26 AM11/13/18
to geb-...@googlegroups.com
To be more clear: you must only add username and password in that first call. Do not use them it subsequent calls, otherwise the browser will refuse to render the page.
Reply all
Reply to author
Forward
0 new messages