ruby - Bypass NTLM auth when using Watir/Selenium to automate testing -
i understand watir , selenium have issues ntlm auth when trying login web pages testing. research indicated there 2 normal work around. 1. add credentials url 2. use auto auth plugin/extension. don't have option of using extension in environment, though i'm working on that. so, i'm left passing credentials.
the problem have follows.
chrome: in chrome pass credentials manually (as in type browser directly) http://password:user@example.com/ , opens page, not populate popup. if try manually pass http://example.com?username=usr&password=password, populates auth pop not proceed.
if try automate ruby using following code unknown user name , password. have confrimed usr , pwd correct.
browser.goto("http://example.com?login=usr&password=password") browser.goto("http://password:usr@example.com/")
ie ie behaves bit differently. in ie pass credentials manually http://password:user@example.com/ , returns error can't find page. if try manually pass http://example.com?username=usr&password=password, logs in correctly.
if try automate ruby using following code first example throws page can't found error. second example opens page, not populate popup. have confirmed usr , pwd correct.
browser.goto("http://example.com?login=usr&password=password") browser.goto("http://password:usr@example.com/")
what doing wrong?
my environment windows 7 pro, ie 11 , chrome 60.
found article indicates ms removed auth in url. makes sense pwd:usr@ doesn't work. article id: 834489
ok, have found answer. after discussing company's senior architect, there no way access ntlm windows authentication form design. it's literally designed can't automated way security measure.
the 1 workaround did suggest way deal authentication issue use c# (our standard) , open browser assumption user logged in. bypass authorization pop rendering issue null. i'm unclear how this, hope provides useful direction others.
Comments
Post a Comment