basic authentication not working with wptdriver
|
04-24-2012, 07:32 PM
Post: #1
|
|||
|
|||
basic authentication not working with wptdriver
Hi,
I've noticed the following in wptdriver-controlled browsers (FF7 and actual Chrome) with wpt 2.5 and 2.6: The basic http-authentication works for IE but tests fail using wptdriver-controlled browsers. The popup for authentication opens and nothing happens til timeout. As a workaround I am using wpt-script with command setHeader for setting an authentication-header. Regards, Nils |
|||
08-02-2012, 01:56 AM
(This post was last modified: 08-02-2012 01:57 AM by slarisch.)
Post: #2
|
|||
|
|||
RE: basic authentication not working with wptdriver
Hi,
I'm having the same issue. Could anybody please tell me the right syntax for setting an authentication-header? I thought I got, cause one of my tests came up with results, but now it's still ending in timouts or errors. What I tried on my WPT (Desktop-) Instance to test with a wptdriver-controlled FF browser was the following: - filling in username and password at the "Auth" tab - filling in a command for setHeader at the "Script" tab like this Code: navigate http://my-domain-with-authorization.com I guess I need a litte help ![]() Regards |
|||
08-02-2012, 04:31 AM
Post: #3
|
|||
|
|||
RE: basic authentication not working with wptdriver
User name and password in the auth tab should work as long as the auth is "basic" and it doesn't require something fancier. I'm not 100% sure that Auth support was added for Firefox/Chrome though which may be why you are having an issue.
If you use a script then you need to reverse the order of the commands and use the correct syntax for the setHeader command. Something like: setHeader Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== navigate http://my-domain-with-authorization.com |
|||
08-02-2012, 05:44 PM
Post: #4
|
|||
|
|||
RE: basic authentication not working with wptdriver
Great! It's working now!!
I encoded my "username:password" string with a Base64 Encoding tool and put the commands you mentioned inside my "Navigation Script" textarea. Thanks Patrick! |
|||
11-25-2014, 10:56 PM
Post: #5
|
|||
|
|||
RE: basic authentication not working with wptdriver
I have authentication site want to do performance testing how I do it ?
Note - I filled in username and password at the "Auth" tab - I filled in a command for setHeader at the "Script" tab like this Code: navigate http://my-domain-with-authorization.com setHeader('Authorization','Basic ' + EncodingUtil.base64Encode('MyUsername' + ':' + 'MyPassword')) but I can’t make sure WPT access my site “screen shots” don’t show that Regards M.Harby |
|||
11-26-2014, 12:31 AM
Post: #6
|
|||
|
|||
RE: basic authentication not working with wptdriver
Does your site use BASIC auth or is it a html-based login? Your script is also completely wrong if you look above. The setHeader command needs to come before the navigate and it should look like:
Code: setHeader Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)