In my python project, the login process is handled by the HttpBasicAuth handler. After getting the response I should load the main page via selenium.
How it is supposed to be done?
It has the baseurl. When the base url is loaded by python-selenium, the pop-up box asks for the username and password for authentication. Then it enters into main page.
Here are the two steps:
- Step 1: Login (using HttpBasicAuth handler)
The reason I am using the HttpBasicAuth handler is that when I open my url it opens a popup window for login. Since, we didn't know the control of the popup-modal dialog window to be handled by Selenium, we switched to HttpAuthentication.
(This is the part I need suggestions for.)
- Step 2: After getting the Response, process the remaining steps in selenium.
In this intermediate part I use the response from HttpBasicAuth handler to authenticate so that Selenium can continue with the other steps in the test.
How can I make the site authenticated in Selenium? Do I have to create a cookie for Selenium webdriver by using HttpBasicAuthentication Response so as to skip the login box?