How to Handle Basic Authentication Popup

If you are automating a scenario that requires filling basic authentication popup such as the below, you can use a simple method which includes Desktop_Fill command and hotkey variables.

popup.png

 

1- Create an automated test case and define a step with Goto_URL command to navigate to the website

2- Define a step with Desktop_Fill command where the option "Use Focused Component" is selected

3- In the Value field, enter the below. The username should be replaced with the username and password should be replaced with the password. The hotkey variables below will be pressing Tab after the username is filled and Enter after the password is filled.

username@system.key.tabpassword@system.key.enter

 

* Here is an example of this step:

mceclip0.png

4- You can also templatize your values and inject them in the Value field. They would appear as below:

${template_name.field_name}@system.key.tab${template_name.field_name}@system.key.enter

 

* Here is an example of this step:

mceclip1.png

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.