Rupal Desai
Rupal Desai

Reputation: 1

What are the configuration are required for basic authentication to run automation code for Microsoft Edge 44 version?

need to run my automation script on edge browser(version 44) but I don't know how to handle basic authentication in Edge.

Is there any specific configuration for Edge?

My OS: Windows 10.

I am using Katalon Studio.

Upvotes: 0

Views: 215

Answers (1)

Zhi Lv
Zhi Lv

Reputation: 21656

Please check this article:

You pass in your username and password to authenticate the request. It will be encoded to 'Authorization' request's headers as you can see below. enter image description here

About using Katalon studio with Microsoft edge web driver, first, please Install WebDriver for Microsoft Edge version 18 and newer:

DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0

Then refer to the following code and link to do the web automated testing (need to change the ChromeDriver to EdgeDriver):

WebDriver driver = new ChromeDriver();
String baseUrl = "https://www.katalon.com/";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("https://katalon-demo-cura.herokuapp.com");
driver.findElement(By.id("btn-make-appointment")).click();
driver.findElement(By.id("txt-username")).clear();
driver.findElement(By.id("txt-username")).sendKeys("John Doe");
driver.findElement(By.id("txt-password")).clear();
driver.findElement(By.id("txt-password")).sendKeys("ThisIsNotAPassword");
driver.findElement(By.id("btn-login")).click();
driver.quit();

Introduction to Web Testing

Troubleshooting web automated testing

Upvotes: 1

Related Questions