Friday, 28 December 2012

Handling browser-level authentication | Selenium


Whenever a site prompts for an username and password, make use of the following script to override such authentication,

driver.get("http://username:password@site.com/page");

e.g., driver.get("http://admin:root@site.com/page");

2 comments:

  1. Thanks for the great information in your blog Selenium Training in Chennai

    ReplyDelete
  2. If password contains @ then how will you handle this?

    ReplyDelete