Chris Withers wrote:
Is there any way to switch users, where the users are authenticated by
basic auth, when doing a selenium test run?
Interesting question! Unfortunately, the answer is no, AFAIK.
Certainly, Selenium has no support for authentication other than what
the browser itself provides. Basically, you need the browser to discard
it's cached credentials for the site; and I don't think there *is* a way
to do that. Not a cross-browser, standards-compliant, way at least:
perhaps someone know some browser-specific tricks?
One idea: a while back, when trying to facilitate *manual* testing of an
authenticated web-app, I implemented switchable authentication
"schemes". One scheme used Basic-Auth, another used SSL Client Certs.
Then, to make testing easier, we had a scheme that just extracted a
username from request-parameters. Could you do something similar for
your app, ie. deploy it in such a way that it "authenticates" using a
request-param, or a cookie? If so, switching users would be straightfoward.
--
cheers, MikeW http://www.dogbiscuit.org/mdub/
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users