Reputation: 1
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
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.
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();
Troubleshooting web automated testing
Upvotes: 1