protractor and basic auth box

1,230 views
Skip to first unread message

SA

unread,
Sep 16, 2013, 7:11:37 PM9/16/13
to ang...@googlegroups.com
Hello,

Just getting started with protractor and trying to 
fill in the basic http authentication window with 
user name and password from protractor code.

var util = require('util');
require('protractor/jasminewd');

describe("Index page", function() {
  var ptor;

  beforeEach(function() {
    ptor = protractor.getInstance();
    ptor.get('#/'); // this brings up the basic auth box, need to enter use name and password
  });

  it("should do something", function() {
    ptor = protractor.getInstance();
    expect(ptor.getCurrentUrl()).toContain('#/');
  });
});

How do I fill in the basic auth dialog box?

Thanks a lot in advance!

SA

SA

unread,
Sep 17, 2013, 10:18:48 AM9/17/13
to ang...@googlegroups.com
im setting 
 baseUrl: 'https://username:password@url'
in protractor setting.... works fine in chrome now
Reply all
Reply to author
Forward
0 new messages