Here is post which explains you how to handle basic authentication.
Problem:
Some of the applications that are secured with Basic Authentication. If you want to access those applications first you need to pass credentials. Those applications will launch a system level pop-up which cant not be handled by selenium.
IF you access below url it will ask for authentication.
http://the-internet.herokuapp.com/basic_auth
Solution:
By specifying userName and password in URL when accessing the page we can avoid system level dialog. This approach will work for HTTP and HTTPS pages.
Reference: http://elementalselenium.com/tips/13-work-with-basic-auth
Example:
Problem:
Some of the applications that are secured with Basic Authentication. If you want to access those applications first you need to pass credentials. Those applications will launch a system level pop-up which cant not be handled by selenium.
IF you access below url it will ask for authentication.
http://the-internet.herokuapp.com/basic_auth
Solution:
By specifying userName and password in URL when accessing the page we can avoid system level dialog. This approach will work for HTTP and HTTPS pages.
Reference: http://elementalselenium.com/tips/13-work-with-basic-auth
Example: