I want to test a mobile website on a real iOS device. The site is “secured” with a basic authentication.
I try to open my site like:
The iPhone shows me always the basic auth pop up.
Is there any option to handle this?
Thanks a lot
Basic Auth is mainly supported for Google Chrome. We do have the workaround for Basic auth in Safari in manual testing. For that, you must have tunnel installed in your system.
Here is the link for the same: Perform Testing Of Locally Hosted Web Pages | LambdaTest
Once you will install the tunnel successfully, then follow the below mentioned steps:
Go to Command Prompt(for windows) and open the Tunnel folder.
Pass the below command in the Tunnel:
LT --user --key <access_key> -b https://admin:firstname.lastname@example.org/basic_auth –mitm
Here you would need to mention your User name and access key. Also, admin:admin in the above command is the username and password of the URL(The Internet) so we would need to change the command as per our website and the credentials.
Once you will pass the command shared in step 2, it will look something like this:
Once your tunnel will start and running, you need to go to LT dashboard and mention the URL in the bar as shown below:
That it, you can launch the session and can perform the testing.
Hope that helps. If you still need any help or have any queries, just drop us an email to support@lammbdatest and we will look into it.
thanks for the manual solution. In our case we need the automated way.
If you wish to achieve this in Automation, then the Steps from 1 to 3 will be the same.
After step 3, just go to your script and mention the URL for which you wanted to test the Basic Auth and run your test. It will work.
Here is how you need to pass the URL in the script if you are using Java.
Let us know if you have any questions.